"IF" "AND" Statement

P

Portuga

Hi

In Cell A1 I have Possible Values from 1 to 6.
I want to have the following conditions in B1:

If a1=1 then "R",
If a1=2 then "S",
If a1>2 then "Yes"

Thanks
 
P

PipTT

You can use a nested IF formula in B1:

=IF(A1=1,"R",IF(A1=2,"S",IF(A1>2,"Yes","")))

or

=IF(A1=1,"R",IF(A1=2,"S","Yes"))

Not sure how AND comes into it
 
R

Ron Coderre

How about something like this:

B1: =CHOOSE(MIN(+A1+1,4),"","r","s","yes")

Regards,
Ro
 
C

CLR

Put this formula in B1..........

=IF(A1=1,"R",IF(A1=2,"S",IF(A1>2,"Yes","")))

Vaya con Dios,
Chuck, CABG3
 
Top