how to do multiple IF THEN formulas

H

hailnorm

I have a dropdown list (in cell D12) that displays either "Dollars"
"Pounds", "Euros". In cell A5, I need the cell to display eithe
"D","P" or "E" deping on what the user picks from the dropdown list.

Apparently my formula:

=IF(D12="Dollars","D","X") + IF(D12="Pounds","P","X")
IF(D12="Euros","E","X")

doesn't work. I get a #value! error.

Have I got the formula wrong... doesn't "+" allow you to use multipl
formulas? Is there another (easier) way to do this
 
J

JE McGimpsey

The + operator returns a #VALUE! error when one or both of the operands
is text. You *could* use the concatenate operator:

=IF(D12="Dollars","D","") & IF(D12="Pounds","P","") &
IF(D12="Euros","E","")

There are better methods, though:

=IF(D12="Dollars","D",IF(D12="Pounds","P",IF(D12="Euros","E","")))

or, put the values with their abbreviation in a table, say in J1:K3, and
use VLOOKUP:

=VLOOKUP(D12,J:K,2)
 
B

Bernard V Liengme

Do you really want to use IF?
A simple way would be =LEFT(D12,1)
Bernard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top