Loading…
Loading…
SWITCH compares one value against a list of possible matches and returns the result for the first match. An optional last argument is the default when nothing matches. It is cleaner than many IFs when you test one cell for exact values.
Syntax
SWITCH(expression, value1, result1, [value2, result2], …, [default])
Example: =SWITCH(A2,"N","North","S","South","Unknown")
Common mistakes
Read the lesson, then try it yourself in a live spreadsheet.