SWITCH
LogicalExcel 2019Compare one expression against a list of values and return the match.
Syntax
SWITCH(expression, value1, result1, [value2, result2], …, [default])
Examples
=SWITCH(A2, "N","North", "S","South", "E","East", "W","West", "?")
→
Good to know
- SWITCH tests equality only. For ranges/comparisons use IFS.
Related functions
More Logical functions
Syntax follows Microsoft’s documentation. Examples are written to be pasted into a cell and checked. Argument separators may be ; in your locale. The AI explainer runs on a free community model — verify anything important.