WRONG RESULTWrong result
Check that every range starts and ends on the same rows, and that numbers are stored as numbers.
SWITCHUse SWITCH to expand a short code into a label. This guide shows the exact structure, a working example and the mistakes most likely to break it.
Verified by JosephineReviewed July 25, 2026✓=SWITCH(expression, case1, value1, [case2, value2, …], [default])expressionvalue to evaluate
casepossible match
valueresult for that case
defaultoptional fallback
Edit any highlighted cell below. The example recalculates immediately.
| A · STATUS | B · VALUE | |
|---|---|---|
| 2 | ||
| 3 | ||
| 4 | ||
| 5 |
CompleteUpdates liveTry changing a value above. This example runs entirely in your browser.
expressionvalue to evaluate
casepossible match
valueresult for that case
defaultoptional fallback
WRONG RESULTCheck that every range starts and ends on the same rows, and that numbers are stored as numbers.
FORMULA PARSE ERRORCheck commas, quotation marks and closing parentheses. Your locale may use semicolons instead of commas.
UNEXPECTED BLANKSTest the source cells for hidden spaces, empty strings and inconsistent data types.