Intermediate
Logical
SWITCH
Compares one expression against a list of values and returns the result matching the first one found, with an optional default if nothing matches.
Compatibility: Excel 2019, Microsoft 365
Syntax
=SWITCH(expression, value1, result1, [value2, result2, ...], [default])
Example
=SWITCH(A1,1,"Low",2,"Medium",3,"High","Unknown")
When to Use It
Use SWITCH instead of nested IFs when checking one value against several specific possibilities — e.g. converting a numeric status code into a readable label.