ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there formulas which set text to equal a number? (https://www.excelbanter.com/excel-worksheet-functions/161070-there-formulas-set-text-equal-number.html)

Barbara S

Is there formulas which set text to equal a number?
 
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.

T. Valko

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.





All times are GMT +1. The time now is 01:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com