Need simple IF formula, please

C

Connie Martin

I know this is simple, but I don't know how to write it:

In V1262 I need this formula: If R1262 and Y1262 are the same, then 39 will
appear in V1262. If, however, W1262 and Y1262 are the same, then it will be
38. If again, however, W1262 is less than Y1262, then it will be 37 in V1262.

37, 38 and 39 are simply code numbers.

Thank you.
Connie
 
J

JE McGimpsey

One way:

V1262: =IF(R1262=Y1262,39,IF(W1262=Y1262,38,IF(W1262<Y1262,37,"")))

Note that if none of the conditions apply, the null string is returned.
 
K

kassie

=IF(Y1262=R1262,39,IF(Y1262=W1262,38,IF(Y1262>W1262,37))) will work.
However, what if R, Yand W are equal to Y?
 
C

Connie Martin

Thank you very much to both of you, Dave and Kassie. How simple! Why
couldn't I have figured that out. I think I try to complicate things too
much. Connie
 
Top