Skip to content
Blog/Excel
Excel

Excel IF Statement with Multiple Conditions: AND, OR, IFS, and SWITCH

Write Excel IF formulas with multiple conditions using AND, OR, nested IF, IFS, and SWITCH. Includes practical budget and review examples.

Do this with AI

Try Griddy free

Start in your browser. Also works with Excel and Google Sheets.

By Justin Freels//7 min read

The basic IF formula checks one condition. Real-world spreadsheets usually need more: flag overspend only when a category is high and approved, mark a row for review when either margin or cash is below target, or assign a status based on several thresholds.

This pattern shows up constantly in small business budget templates, expense trackers, and other review sheets where the formula needs to classify rows instead of just calculate totals.

Quick reference

GoalFormula pattern
Both conditions must be trueIF(AND(...), ...)
Either condition can be trueIF(OR(...), ...)
Different outputs for many conditionsNested 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.

fx
=IF(AND(B2>500, C2>30), "Review", "OK")

Microsoft documents a maximum of 255 individual conditions for AND and OR. In practice, formulas become difficult to test and maintain long before that cap; use a lookup table or helper columns when the business rule has many branches.

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:

fx
=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:

fx
=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:

fx
=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:

fx
=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:

fx
=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:

fx
=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

Test the rule before filling it down

Check at least one row for every expected outcome plus the boundary values. In the bonus example, test exactly 100000 and 150000 as well as values just above and below them. The formulas use > rather than >=, so equality does not qualify.

Keep business rules out of a long formula when managers need to change them often. A threshold table plus XLOOKUP can be easier to review than another nested IF level.

Do this with AI

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.

Use the logic in a small-business budget or expense tracker, and inspect every threshold before applying the formula to a full workbook.

Sources

Do this with AI

Turn the instructions into a finished spreadsheet.

Tell Griddy what you need in plain English, then inspect and keep editing the result in the browser, Excel, or Google Sheets.

Try Griddy freeStart in your browser. No download required.
Also works withExcel Google Sheets

Use this on real templates

Apply IF logic inside budget workflows

Nested conditions are most useful when a sheet needs review flags, exception logic, or different outputs based on spend and status rules.

Finance