If function with some "And" plus an "Or" criteria

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Is this possible to do? I know how to do an If with AND:

IF(AND(criteria1,criteria2),True,False)

and I can do an OR:

IF(OR(criteria1,criteria2),True,False)

but can I do both? Thanks for any help.
 
You can have multiple ANDs and ORs in a logic equation. But doing an OR will
include theh AND condition

AND Table
B
False True

A False False False
True False True


OR Table

B
False True

A False False True
True True True



The condition A = True and B = True is True in both tables above.
 
Say you have a situation where you have multiple criteria, and you want a
true to return with the All of the following criteria:
1: Criteria1 OR Criteria 2
2: Criteria3
4: Criteria4 & Criteria5 or Criteria6
=IF(AND(OR(crit1,crit2),crit3,OR(AND(crit4,crit5),crit6)),TRUE,FALSE)
 
=if(and(a1=5,b1=3,or(c1=5,c1=17)),"a1=5 AND b1=3 And c1=(5or17)","one not true")
 

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

Back
Top