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

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.
 
D

Dave Peterson

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.
 

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