IF function

  • Thread starter Thread starter KAY
  • Start date Start date
K

KAY

What is wrong with the function?
=IF(H55=A,"2",IF(H55=B,"4",IF(H55=C,"6",IF(H55=D,"8",IF(H55=E,"10","Z")))))
Thank you for your help!
Karen
 
You need to put quotes around the letters, like this:

=IF(H55="A","2",IF(H55="B","4",IF(H55="C","6",IF(H55="D","8",IF(H55="E","10","Z")))))

However, you might NOT need the quotes around the numbers, as they
will become text values.

Hope this helps.

Pete
 
Try this alternative for your intents
=IF(H55="","",IF(ISNUMBER(MATCH(H55,{"A";"B";"C";"D";"E"},0)),VLOOKUP(H55,{"A",2;"B",4;"C",6;"D",8;"E",10},2,0),"Z"))

In your posted formula, text (eg: "A", "B") should appear within double
quotes, numbers without. You had it mixed up.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,000 Files:358 Subscribers:55
xdemechanik
 
KAY said:
What is wrong with the function?
=IF(H55=A,"2",IF(H55=B,"4",IF(H55=C,"6",IF(H55=D,"8",IF(H55=E,"10","Z")))))
Thank you for your help!
Karen

My guess is you would want A, B, C, D and E in quotes and 2, 4, 6, 8 and 10 not
in quotes.
 
Back
Top