SWITCH
Supported, behaves as documentedCategory: Logical · Last tested 2026-07-04
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel | Yes | Not yet | n/a |
| Google Sheets | Yes | Not yet | n/a |
| LibreOffice Calc | Yes | Yes (24.2.7.2, 2026-07-04) | Supported, behaves as documented |
Executed test cases
LibreOffice Calc 24.2.7.2 (tested 2026-07-04)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SWITCH(2,1,"one",2,"two",3,"three") | Matches the second value/result pair | two | two | Matched |
| =SWITCH(5,1,"one",2,"two","default") | Trailing unpaired argument acts as the default | default | default | Matched |
| =SWITCH(5,1,"one",2,"two") | No match and no default -> #N/A | #N/A | #N/A | Matched |
| =SWITCH("b","a","A","b","B","c","C") | Matching on text values | B | B | Matched |
Docs & syntax
- Excel: official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation