Using the "if" function, the "and" function and the "or" function

  • Thread starter Thread starter Superblonde64
  • Start date Start date
S

Superblonde64

I am not sure if or how to use all three in a formula. For example:

=if(b2="red", and c3="blue", d6="green")

if that makes sense at all.
 
Maybe something like:

=if(and(b2="red",c3="blue",d6="green"),"all three match!","not all 3 match")

or

=if(or(b2="red",c3="blue",d6="green"),"at least one matches","none match")

or you can use both to make the criteria more complex

=if(and(b2="red",or(c3="blue",d6="green")),then,else)
B2 has to be red and either (or both) c3=blue or d6=green
for the "then" portion to be returned.
anything else, and you get the else portion.
 
Back
Top