← All functions

SWITCH

Supported, behaves as documented

Category: Logical · Last tested 2026-07-04

Support matrix

EngineDocumentedLive-testedVerdict
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)

FormulaDescriptionResultExpectedVerdict
=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