IF, IFS, or SWITCH — pick the right branching tool

Nested IF is not a personality trait. Practice IF for two outcomes, IFS for bands, and SWITCH for code maps—with answers and lesson links.

Pick the branching tool that matches the shape of the problem. Readable formulas survive handoffs and timed tests. Guides: IF, IFS, SWITCH, logical functions.

IF — two outcomes (optionally with AND/OR)

Pass/fail, yes/no, eligible/not.

=IF(B2>=70, "Pass", "Fail")

Compound test:

=IF(AND(B2>=70, C2="Yes"), "Eligible", "No")

Use OR when any condition is enough. Guide: logical operators.

IFS — ordered thresholds

Grades and commission tiers are ordered tests. Put the strictest condition first and finish with a TRUE catch-all so you never surprise yourself with #N/A.

Example — score in B2:

=IFS(B2>=90,"A", B2>=80,"B", B2>=70,"C", B2>=60,"D", TRUE,"F")

SWITCH — discrete codes

When one cell is 1/2/3 or W/E/C, SWITCH maps values to labels without repeating the expression. It is not for >=90 bands—that is still IFS.

=SWITCH(A2, "W","West", "E","East", "C","Central", "Unknown")

Exercise 1 — eligibility

B2 score, C2 consent (Yes/No). Eligible only if score ≥ 70 and consent is Yes.

Answer: =IF(AND(B2>=70, C2="Yes"), "Eligible", "No")

Exercise 2 — rewrite nested IF hell

Someone wrote:

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

Rewrite with IFS (include a TRUE catch-all).

Answer: =IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F")

Exercise 3 — region codes

A2 holds N, S, E, or W. Map to full names; anything else → Check.

Answer: =SWITCH(A2,"N","North","S","South","E","East","W","West","Check")

Exercise 4 — interview trap

When do you still use nested IF?

Answer: short two- or three-branch logic, older Excel without IFS, or when each branch needs a different calculation shape. For long grade bands, IFS (or a lookup band table) is clearer. Band lookups: VLOOKUP approximate match and XLOOKUP practice.

Practice rule

For a full graded set, open IF practice exercises (canonical problem bank). Rewrite one nested IF monster per week into IFS or SWITCH. Then drill IF function, IFS function, and IF combinations. Guides: IF, IFS. For interview Q&A, see Excel interview questions.

Excel practice hub · Free lessons · Blog