SWITCH Function in Apple Numbers: Syntax, Examples and Compatibility
Use SWITCH in Apple Numbers to map a code to a label without a chain of nested IF formulas. Two original examples, expected results, cautions and official software documentation.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Apple Numbers. How formula examples are checked
Quick answer: map a code to a label without a chain of nested IF formulas in Apple Numbers. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.
Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Apple Numbers test results. A guide being published here does not certify every software release or file-import scenario.
Syntax and arguments
=SWITCH(expression, value1, result1, [value2, result2], ..., [default])
expression is compared to each case value. Optionally supply a final default when no case matches.
Best use case: Map a code to a label without a chain of nested IF formulas.
Set up the example sheet
Imagine order data containing country codes CA, US and other values. Work with literal codes first to make it easy to spot spelling problems.
Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.
Worked example 1: SWITCH with known input
=SWITCH("CA","CA","Canada","US","United States","Other")
Expected output: Canada.
The first case matches CA and returns the matching label.
Worked example 2: a second SWITCH case
=SWITCH("MX","CA","Canada","US","United States","Other")
Expected output: Other.
Neither listed case matches MX, so the final default is returned.
Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.
Practical advice and troubleshooting
When this formula helps: Use SWITCH for equality-based mappings; use IFS when the conditions involve inequalities, ranges or multiple booleans.
Important edge case: Leading/trailing spaces in imported codes cause otherwise sensible mappings to miss. Clean codes before comparing.
If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. An error that looks like a missing function may reflect a software version rather than incorrect data.
Compatibility and version considerations
The current official Apple Numbers function index includes this function. Table-relative references and current Numbers versions must be checked when transferring formulas from Excel. The function name is shared by Excel and Sheets; availability in older workbook versions is a separate concern. The Excel/Google comparison is background only, not a claim of identical behavior in Apple Numbers.
Check your installed release for availability and dynamic-array support.
Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.
Application-specific source note: The current official Apple Numbers function index includes this function. Table-relative references and current Numbers versions must be checked when transferring formulas from Excel.
Formula separator: These examples use commas for the function-argument separators. Locale settings can change entry conventions.
Related guides and official documentation
-
Apple Numbers documentation for SWITCH — function syntax and current vendor information.
Editorial verification: Function name checked in official vendor catalogue on 2026-10-12. The two example outputs are independently reasoned; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.