Intermediate Excel · Interactive lesson 3 of 12
Logic formulas
IF handles one condition. Real business rules usually need more: several tiers, several conditions at once, or a graceful fallback when the math itself breaks. IFS, AND/OR, and IFERROR cover those cases.
Screens shown: Excel for Microsoft 365 for Windows. Practice works in any browser.
Written tutorialLogic Formulas in Excel: IF with AND, OR and IFSSkill check
Try these first:
- Write an
IFformula that returns one of two outcomes. - Write an
IFSformula that sorts a value into three or more categories. - Combine two conditions with
ANDorORinside a rule. - Wrap a formula in
IFERRORso a bad input shows a message instead of an error.
All familiar? Skip ahead to I4 — Lookup Formulas.
Targeted teach
What you're learning
IF- One condition, two outcomes:
=IF(C2>=D2,"Met Goal","Below Goal"). IFS- Checks conditions in order and returns the first match —
=IFS(ratio>=1,"Met",ratio>=0.9,"Close",TRUE,"Review"). That lastTRUEis a catch-all for everything else. AND/OR- Combine conditions —
ANDneeds every one true,ORneeds just one. Nest them insideIF:=IF(OR(C2<D2,E2<0.05),"Yes","No"). IFERROR- Catches whatever error the wrapped formula would have thrown and shows a fallback instead —
=IFERROR(C2/D2,"N/A")turns a#DIV/0!into something readable. - Readable rules
- Long nested
IFs get unreadable fast — the moment you're past two tiers, reach forIFSinstead.
IFERROR catches every error alike — #DIV/0!, a bad reference, anything — so use it once you know what's likely to go wrong, not as a blanket way to hide problems.Where to find it in Excel
Formulas›Logical›IFS · AND · OR · IFERROR
| A | B | C | D | E | F | G | H | ||
|---|---|---|---|---|---|---|---|---|---|
| 1 | Student | Score | Grade | Bonus? | |||||
| 2 | Ana | 94 | A | TRUE | |||||
| 3 | Ben | 78 | C | FALSE | |||||
| 4 | Chris | 85 | B | TRUE | |||||
| 5 | Dana | 66 | D | FALSE | |||||
| 6 | |||||||||
| 7 | |||||||||
| 8 |
Swipe sideways to see the whole window.
- 1Formulas tab.
- 2Logical has IF, IFS, AND, OR, NOT, IFERROR and SWITCH.
- 3IFS tests conditions in order and returns the first match.
- 4TRUE as the last test catches everything else.
Rendered view of Excel for Microsoft 365 (Windows). Ribbon layout can differ slightly on Mac, Excel for the web or a narrow window.
Guided practice
The same sales-rep table from I1. Four dashed cells — Status, Tier, Needs Review, and a safely-wrapped ratio — one per row.
Independent variation
Design your own tiered rule
Take a goal-tracking sheet of your own — sales, grades, fundraising — and build a three-tier IFS rule for it. Add one AND/OR rule that flags a row needing attention, and wrap any formula that could divide by zero or miss a value in IFERROR.
Spot a mistake or have an idea for this lesson? Send feedback