Donate SIGN UP

Microsoft Excel

Avatar Image
benny3008 | 20:24 Wed 15th Aug 2012 | Technology
9 Answers
I want to do something in excel which I will try to explain, I want to be able to put a letter in a cell such as 'A' which is to mean a cost. e.g. if you put an 'A' in a cell, it automatically knows that it means £30, or if I put a 'B' in the cell it knows that it means £40 but I want it to stay showing as the letter and not change to the price. Any help appreciated
Thanks
Gravatar

Answers

1 to 9 of 9rss feed

Best Answer

No best answer has yet been selected by benny3008. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Why not leave the cell as it is, showing the letter, then another cell (maybe hidden) showing the value (that you can get from a 'look up' table). Other calculations can then refer to the value in the hidden cell.
There will be other ways of doing it too
How will you be using these 'values' in the spreadsheet calculations?
I don't know how to do it but I believe you use 'conditional formatting'. You could try Help.
Question Author
Thanks for all answers, I am basically setting up a work event and a meal as an apprenticeship task. there are multiple choices of meal option at the restaurant and I want each meal choice to have it's own specified code (the letter). So by each persons name, it can have: starter - A, Main meal - F, Dessert - G. and so on etc...
If you data is in a single column his approach is the neatest

http://en.allexperts....ical-Value-Letter.htm
I would do this using the COUNTIF function summed for as many options 'A, B, etc) then multiply by the relevant £ for the total cost.
As factor30 suggested, you can use a lookup table, which should look like this (the "," signifies the next cell):

A, £30
B, £40
C, £50 etc.

Then in your calculation cells you can put =VLOOKUP(meal,range,2) - meal is the letter code you want to look up, range is the whole lookup table, 2 is the column of the lookup table with the price you want to return.
Hello, benny3008

You could do it like this:

Use cell A1 for your 'A' or 'B' entry, then copy and paste this formula into cell B1 and then the B cell(s) will display your answer:

=IF(A1="","",IF(A1="A","£30",IF(A1="B","£40
","")))


You can continue this string as much as you like, but be sure to add as many ) at the end as you have ( throughout the string.

You can then copy the formula into cells B2, B3, B4 etc if you want by the usual dragging down method.

Regards

Peter Jameson
The best solution is the VLOOKUP proposed by Aquariel. Look up VLOOKUP in Excel's help for more details, or see this:

http://office.microso...okup-HP005209335.aspx

At the above URL, Example 2 is probably closest to what you want. Your "Item ID" (column A) would be A, B, C, D, E etc ...

1 to 9 of 9rss feed

Do you know the answer?

Microsoft Excel

Answer Question >>