Tests an expression against a list of cases and returns the corresponding value of the first matching case, with an optional default value if nothing else is met.
Parameter List
Syntax
SWITCH(expression, case1, value1)
expression
The value or expression that will be evaluated.
case1
The first case to compare against the expression.
value1
The value to return if the expression matches case1.
Examples
SWITCH(A1, 1, One, 2, Two, Other) returns One
🍪
We use cookies to enhance your user experience and analyze website performance. You can revoke consent anytime. Learn more.