Excel IF Statement with Multiple Conditions
How to write Excel IF formulas that check more than one condition using AND, OR, and nested IFs — with practical examples for each.
The basic IF formula checks one condition. Real-world data almost always requires checking several at once. Here's how to handle multiple conditions cleanly.
Quick reference
| Goal | Formula pattern |
|---|---|
| Both conditions must be true | IF(AND(...), ...) |
| Either condition can be true | IF(OR(...), ...) |
| Different outputs for many conditions | Nested IF or IFS |
IF with AND — both conditions must be true
Use AND when a row only qualifies if every condition is met. For example: flag orders that are over $500 and more than 30 days old.
=IF(AND(B2>500, C2>30), "Review", "OK")You can add as many conditions inside AND as you need — there's no practical limit.
✦ TIP
AND returns TRUE only when every single argument is TRUE. If any one condition fails, the whole AND is FALSE.
IF with OR — either condition is enough
Use OR when any one of several conditions should trigger the result. Flag any order that is either over $500 or more than 30 days old:
=IF(OR(B2>500, C2>30), "Review", "OK")OR returns TRUE if at least one argument is TRUE. You can mix AND and OR inside the same IF:
=IF(AND(A2="Active", OR(B2>500, C2>30)), "Flag", "Clear")This flags active customers who meet either the amount or age threshold.
Nested IF — different results for multiple ranges
When you need more than two possible outputs, nest IF statements inside each other:
=IF(B2>=90, "A", IF(B2>=80, "B", IF(B2>=70, "C", "F")))Excel evaluates from left to right. The moment a condition is TRUE, it returns that result and stops. Order matters — put the most specific or highest condition first.
⚠ WATCH OUT
Nested IFs get hard to read past 3–4 levels. Consider IFS instead.
IFS — cleaner than deeply nested IFs
If you have many conditions, IFS is easier to write and read:
=IFS(B2>=90, "A", B2>=80, "B", B2>=70, "C", TRUE, "F")The last pair TRUE, "F" acts as the "else" — it catches anything that didn't match the earlier conditions.
✦ TIP
IFS is available in Excel 2019 and Microsoft 365. If you're on an older version, stick with nested IF.
SWITCH — for exact-match conditions
When your conditions are all exact matches (not ranges), SWITCH is cleaner than IFS:
=SWITCH(A2, "Q1", "Jan–Mar", "Q2", "Apr–Jun", "Q3", "Jul–Sep", "Q4", "Oct–Dec", "Unknown")SWITCH checks the first argument against each value in order and returns the corresponding result.
A real example: bonus tier calculation
Flag rows based on region and sales threshold:
=IF(OR(AND(A2="East", B2>100000), B2>150000), "Tier 1", "Tier 2")- East region + sales over $100k → Tier 1
- Any region + sales over $150k → Tier 1
- Otherwise → Tier 2
The Griddy way
Writing nested logic by hand is error-prone — one misplaced parenthesis and the whole formula breaks silently with a wrong result. Describe the logic in plain English:
"Flag rows where the region is East and sales are over $100k, or where sales are over $150k regardless of region — call it Tier 1, otherwise Tier 2"
Griddy writes and applies the formula, then highlights the flagged rows so you can verify it worked correctly.
Skip the manual work
Describe it. Griddy does it.
Instead of writing this formula yourself, just tell Griddy what you need in plain English. Works in Excel and Google Sheets.