Strugling IF Formula

B

Brento

HI All,

I am trying to write an OR IF formula. Maybe there is an easier way.

This is what I am trying to write
=IF(a2=D1,1,0),orif(B2=D1,2,0),orif(C2=D1,1,0) - The formula would be
in D2

What the formula needs to say is if the value in A2 equals D1 return
value 1, or if not then if the value in B2 equals D1 return value 2, or
if not then if the value in C2 equals D1 return value 1.

Please help maybe I am trying the wrong formular?

thanks
Brento
 
M

Michel Bru

VBA Noob a écrit :
Try this

=IF(B2=D1,2,IF(OR(A2=D1,C2=D1)<>"",1,""))

Sorry, this is wrong.

This is not what Brento has asked for!
macropod give the right solution.

Michel Bruyère.
 
M

Michel Bru

VBA Noob a écrit :
Try this

=IF(B2=D1,2,IF(OR(A2=D1,C2=D1)<>"",1,""))

Sorry, this is wrong.

This is not what Brento has asked for!
macropod give the right solution.

Michel Bruyère.
 
Top