ZonoTools

Excel IF nested Function (Multi-Tier Logic) – Examples & Practice

Practice nested IF formulas online with an interactive grid, instant feedback, and clear formula help.

Instruction

Build a nested IF formula to grade scores into A/B/C.

Formula Syntax

Nested pattern:

What it does

Nested IF stacks multiple binary decisions so you can classify values into more than two buckets. Excel evaluates from the outer IF inward until a condition matches.

Excel IF nested Function Examples

Three-letter grades

=IF(B2>=90,"A",IF(B2>=75,"B","C"))

Returns A, B, or C based on score bands.

Four tiers with explicit floor

=IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C","D")))

Adds another tier—watch that boundaries do not overlap ambiguously.

Gate before nested logic

=IF(ISBLANK(B2),"",IF(B2>=90,"A",IF(B2>=75,"B","C")))

Avoids grading empty cells.

exam-scores.xlsx

AB
1StudentScore
2Rin92
3Sky81
4Tom74
5Uma88
6Val69
7Output

Input Formula

Need Help?

Tips

  • Write tier boundaries in a visible table next to the sheet.
  • Prefer **IFS** or **XLOOKUP** for new workbooks.
  • Use **IFERROR** only for true error cases, not to mask logic bugs.

IF nested Function Use Cases

  • Letter grades and commission ladders
  • Simple approval matrices before a database exists
  • Legacy models that predate IFS
  • Teaching how Excel evaluates nested expressions
  • Quick prototypes before refactoring to IFS or lookups

Common mistakes - IF nested function not working

  • Off-by-one at tier edges (89.9 vs 90)
  • Missing default else branch
  • Unreadable 5+ level nests without formatting
  • Mixing text and numbers in the same column
  • Copying formulas without locking boundary cells

FAQ

Nested IF vs IFS?

IFS lists tests in order with flatter syntax. Nested IF is still common in legacy files.

How do I avoid mistakes?

Align boundary rules (>= vs >), count parentheses, and test middle tiers explicitly.

Does IF short-circuit?

Do not rely on side effects in both branches—Excel may still evaluate parts you did not expect in complex models.

Can I return formulas from IF?

Yes, each branch can be an expression, not only literals.

When should I switch to a lookup table?

When tiers or labels change often, a small key table plus XLOOKUP is easier to maintain than a deep IF tree.

Comparison

Pattern Readability
Nested IF Medium–low when deep
IFS Higher for many tiers
XLOOKUP table High when labels change

Example

=IF(B2>=90,"A",IF(B2>=75,"B","C"))

Advanced examples

Combine with AND/OR

=IF(AND(B2>=60,C2="OK"), IF(B2>=90,"A","Pass"), "Review")

Shows nested IF inside broader eligibility rules.

Migrate to IFS

=IFS(B2>=90,"A", B2>=75,"B", TRUE,"C") replaces the first example with a flatter structure.

Related functions

Compare a flat IF or ordered IFS ladder when each branch is a simple test—nesting is hardest where readability matters most.

Sometimes a small lookup table plus XLOOKUP replaces three levels of IF with one maintainable map.