Nested if

  • Thread starter Thread starter ab3d4u
  • Start date Start date
A

ab3d4u

I have 4 "if" scenarios for which I am looking a formula. It is just
basic scenario where I have 4 choices and I need this formula to rea
the four options correctly. Kind of if a then 1, if b then 2,,,
Thanks for your help.
Merry Christmas and Happy Holidays for all
 
Lots of ways, depending on your actual needs. One:


=IF(A1="a", 1, IF(A1="b", 2, IF(A1="c", 3, 4)))


Another:

=MATCH(A1,{"a","b","c","d"})
 
Here is an example of a nested IF:

=IF(A1="A",1,IF(A1="B",2,IF(A1="C",3,IF(A1="D",4,0))))

Laura
 
Another way..........
=LOOKUP(A1,{0,"a","b","c","d",""},{"",1,2,3,4,""})

Vaya con Dios,
Chuck, CABGx3
 
Back
Top