IFS and SWITCH Functions in Excel
IFS and SWITCH are flat alternatives to deeply nested IF formulas. IFS evaluates a list of conditions and returns the result for the first true one. SWITCH compares a single expression against a list of exact values and returns the matching result. In financial models they make tiered rates and account classifications far easier to read and audit than a wall of nested parentheses.
Syntax and how they differ
IFS takes pairs of test and result: =IFS(test1, result1, test2, result2, ...). It returns the result for the first test that evaluates to true and ignores the rest. There is no built-in else slot, so the convention is to end with TRUE, default_value as a catch-all final pair.
SWITCH takes one expression and a list of value and result pairs: =SWITCH(expression, value1, result1, value2, result2, [default]). It checks the expression against each value for an exact match and returns the matching result, with an optional trailing default. The core difference is that IFS evaluates arbitrary logical tests while SWITCH compares one value against a fixed list of literals.
Worked example: rating and region label
A score sits in F1 and a region code sits in G1. Use IFS for the tiered score because each band is a comparison, and use SWITCH for the region because it is an exact-match lookup against codes.
- For the tiered rating, enter
=IFS(F1>=90, "A", F1>=75, "B", F1>=60, "C", TRUE, "D"). - Excel checks the conditions in order and returns the result for the first true one, with
TRUEacting as the final catch-all. - For the region label, enter
=SWITCH(G1, "N", "North", "S", "South", "E", "East", "Unknown"). - SWITCH matches
G1against each code and returns the label, falling back toUnknownwhen no value matches.
| Function | Input | Formula returns |
|---|---|---|
| IFS | F1 = 82 | B |
| IFS | F1 = 55 | D (TRUE catch-all) |
| SWITCH | G1 = S | South |
| SWITCH | G1 = X | Unknown (default) |
IFS uses TRUE as the else; SWITCH uses a trailing default argument.
When each beats a nested IF
Both functions remove the cascade of closing parentheses that makes nested IF hard to audit. The choice between them comes down to the shape of the test.
Reach for IFS when conditions are comparisons or compound logic, and for SWITCH when you are mapping one value to many discrete outcomes.
- Use IFS for tiered thresholds, ranges, and any test using
>,<, orAND. - Use SWITCH for clean code-to-label mappings where the input equals a fixed list of values.
- End IFS with
TRUE, defaultand give SWITCH a trailing default so unmatched inputs return a controlled value, not#N/A. - Both keep each rule on its own pair, which reads top to bottom and is easy to review.
Common pitfalls in models
IFS still evaluates tests in order, so an over-broad early condition will short-circuit the ones below it. Order tiered comparisons from the strictest boundary down, exactly as you would with a nested IF.
Forgetting the catch-all is the second trap. IFS without a final TRUE pair returns #N/A when nothing matches, and SWITCH without a default does the same. SWITCH also only does exact matches, so it cannot test ranges. If you find yourself wanting >= inside SWITCH, you actually need IFS or a lookup table.
Formula Trace
Formula Trace shows which cells feed an IFS or SWITCH result so you can verify the right input drives the classification.
Get ModelMint See how it worksFAQ
What is the difference between IFS and SWITCH in Excel?
IFS evaluates a list of independent logical tests and returns the result for the first true one, so it handles ranges and comparisons. SWITCH compares a single expression against a list of exact values, so it suits clean code-to-label mappings.
How do I add an else condition to IFS?
IFS has no dedicated else argument. Add a final pair of TRUE, default_value, which always evaluates as true when reached and returns your fallback instead of a #N/A error.
Can SWITCH handle greater-than comparisons?
No. SWITCH only checks for exact equality between the expression and each listed value. For ranges or threshold logic, use IFS with comparison tests or an approximate-match lookup table instead.