Combining functions AND and OR

J

Jan Buckley

What is the proper syntax for using AND and OR together in the same
statement? I want to say IF C2=x1 OR c2=x2 OR c2=x3 OR c2=x4, AND c4=y1 OR
c4=y2 OR c4=y3, THEN, ELSE. I can't seem to get it right. Help, please.
Thanks in advance.
 
J

Jim Thomlinson

Give this a whirl...

=if(and(or(C2=x1, c2=x2, c2=x3, c2=x4), 0r(c4=y1,
c4=y2, c4=y3)), "Then", "Else")
 
P

PCLIVE

Try this:

=IF(AND(OR(C2=X1,C2=X2,C2=X3),OR(C4=Y1,C4=Y2,C4=Y3)),"Criteria
Matched","Criteria NOT Matched")

Regards,
Paul
 
D

David Biddulph

=IF(AND(OR(C2=x1,c2=x2,c2=x3,c2=x4),OR(c4=y1,c4=y2,c4=y3)),"Then
condition","Else condition")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top