Switches values with new values if original value matches key
SWITCH( key, value1, returnValue1, [value2, returnValue2...] )
key
value1,
returnValue1
value2
returnValue2
Returns the returnValue for any value that matches key
returnValue
value
Key to find among key:value pairs
value1
Value(s) to check for key value match
Value to return if value1 is matched by key
[value2, returnValue2...]
Additional key:value pairs
Outputs corresponding returnValue for value that matches key
SWITCH(2, 1, "Monday", 2, "Tuesday", 3, "Wednesday", 4, "Thursday") >> "Tuesday"
Last updated 2 years ago