View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Is there formulas which set text to equal a number?

If there are only a "few" different items you can use something like this:

=IF(A1="apples",25,IF(A1="grapes",35,IF(A1="pears" ,28,"")))

If you have many different items then you should create a 2 column lookup
table like this:

...........D..........E
1...apples.......25
2...grapes......35
3...pears........28

Then the formula would be:

=VLOOKUP(A1,D1:E3,2,0)

--
Biff
Microsoft Excel MVP


"Barbara S" <Barbara wrote in message
...
I am trying to create text and when selected from a drop down list a
specific
$ amount is input in the adjacent cell dependent on which item was
selected
from the drop down.