How to and or combined logic in Excel
Flag rows where both a status is active AND a value exceeds a threshold, or mark leads as qualified when they meet any one of several criteria.
Step-by-step instructions
How to and or combined logic — 3 steps
Wrap your conditions in AND() when all must be true, or OR() when any one is sufficient.
Pass the AND or OR result to IF as the logical test.
Nest AND and OR together for complex branching — IF(OR(AND(B2="A",C2>5),D2="VIP"),...).
Example data
Worked example
| Customer | Status | Revenue | Qualify? |
|---|---|---|---|
| Alpha | Active | 1500 | Qualify |
| Beta | Active | 800 | Skip |
| Gamma | Inactive | 2000 | Skip |
Common mistakes
Errors to watch out for
AND/OR used without IF
AND and OR return only TRUE or FALSE. Wrap them in IF to return different values for each outcome — IF(AND(...),value_if_true,value_if_false).
Confusing AND and OR results
AND requires every condition to be true. OR needs just one. If results are unexpected, check whether you meant AND (stricter) or OR (looser).
FAQ
Frequently asked questions
Can I nest AND inside OR?
Yes — =IF(OR(AND(B2="A",C2>5),D2="VIP"),"Yes","No") is valid. B2 must be "A" AND C2>5 satisfies the OR, as does D2="VIP" alone.
Describe your exact spreadsheet problem — get the formula in seconds.
Open AI Formula Generator — FreeRelated how-to guides