The Airtable SWITCH formula maps one expression to a list of exact values and returns the result paired with the first match. Use it to replace nested IF statements that repeatedly test the same field for equality; keep IF for ranges or conditions involving several fields. An optional final default handles anything you haven't mapped.
For example, a bakery's Orders table stores a single select called Status. This formula field, Counter label, turns that status into the words staff should see:
SWITCH(
{Status},
"New", "Order taken",
"Baking", "In the oven",
"Ready", "Ready for pickup",
"Picked up", "Collected",
"Check status"
)
I'd use SWITCH here because each status has one clear label and the next person maintaining the base can read the mappings line by line. Status holds the fact; Counter label calculates a value from it. The formula doesn't change Status or move an order through its workflow.
SWITCH is available on every Airtable plan. Creating or editing the formula field requires Owner or Creator access. Use the browser, Mac app or Windows app for this setup; mobile support is limited. An ordinary formula field calculates for each record without needing an automation.
Add the formula to your table
- Open the base and the table containing Status. If you're starting from scratch, create the single select options New, Baking, Ready and Picked up.
- Click the + to the right of the last field. Name the new field Counter label, then find and select Formula.
- Paste the formula above into the formula editor. Replace
{Status}if your input field has a different name. Keep the option names in straight quotes and copy their current spelling. - Click Create field. If you're editing an existing formula, the button is Save. Check several records in the grid after saving.
These are the documented formula-field steps. Airtable applies the formula to every record in the table; you don't fill it down or enter a separate formula in each cell. If Counter label already feeds a view, lookup or automation, use the scratch-copy conversion below before changing its rule.

Read the pattern/result pairs and the default
The formula functions reference gives the form SWITCH(expression, [pattern, result ... , default]). The brackets describe optional arguments; don't type square brackets or the ellipsis into your formula. In the bakery example:
- Expression:
{Status}, the value to compare. - Pattern and result:
"Ready", "Ready for pickup". The first value is matched; the second is returned. - Default:
"Check status", the final unpaired argument.
Airtable reads the patterns in order and returns the first matching result. Its SWITCH guide requires unique patterns. Give each input value one mapping. If nothing matches, the default is returned; omit that final argument and an unmatched record returns null, displayed as blank.
Here are the expected text results for three example records:
| Status | Counter label | Reason |
|---|---|---|
| Ready | Ready for pickup | Matches the Ready pattern. |
| Empty | Check status | No pattern matches the empty input. |
| Cancelled | Check status | A new option hasn't been mapped yet. |
Choose the default deliberately. A visible Check status label exposes missing mappings. A blank default suits a field whose empty results are filtered into an exception view. Neither choice prevents an unmapped value from being entered into Status.
When a colleague adds Cancelled, add its pattern/result pair before the default. Renaming a field updates its formula references automatically under Airtable's field-reference rules; quoted option names are literal strings, so review the mappings when an option label changes.
Return numbers that can sort, total and format as numbers
Quote text patterns and text results. Leave numeric patterns and numeric results unquoted. For example, this status sort key has numeric output:
SWITCH(
{Status},
"New", 1,
"Baking", 2,
"Ready", 3,
"Picked up", 4
)
Ready returns the number 3; an empty or unmapped status stays blank because no default was supplied. Returning "3" would produce text. I'd leave missing sort keys blank and inspect them separately, because giving an unknown status a plausible rank can hide an unfinished mapping.
For an input that is already a number, use numeric patterns too. With a Tiers number field, SWITCH({Tiers}, 1, "Single tier", 2, "Two tiers", 3, "Three tiers", "Ask the baker") returns text labels. A single select option named 2 is text; check the input field's type before copying the numeric version.
Keep every nonblank result the same type. A numeric mapping with a text default such as Check status can lose its number-formatting options. In Edit field → Formatting, a numeric formula offers decimal, integer, currency, percent and duration formats under Airtable's output-formatting rules. Put a human-readable warning in a separate field if the numeric result must remain numeric.
VALUE() converts numeric text to a number, but you don't need it around a SWITCH that already returns numeric literals. The community's quoted-number example shows both routes. Fixing the results themselves makes the rule easier to maintain. For date results, keep the branches date-valued and use date formatting; formatted date text isn't a date value.
Handle an empty field separately from a recorded zero
An empty Status and an unmapped Status both reach the default. If empty means the order hasn't been triaged, give it a separate label before evaluating the mappings:
IF(
{Status} = BLANK(),
"No status yet",
SWITCH({Status},
"New", "Order taken",
"Baking", "In the oven",
"Ready", "Ready for pickup",
"Picked up", "Collected",
"Check status"
)
)
Don't reuse that blank check unchanged for a number field where zero has meaning. Airtable's blank-value guidance explains the numeric-zero caveat and uses conversion to text to distinguish an empty number from 0.
For a Candles field containing nonnegative whole-number counts, this formula returns a text instruction:
IF(
BLANK() = CONCATENATE({Candles}, ""),
"Ask the customer",
SWITCH({Candles},
0, "No candles",
1, "One candle",
"Several candles"
)
)
| Candles | Candle note | Path |
|---|---|---|
| Empty | Ask the customer | The text-conversion guard detects no value. |
| 0 | No candles | The guard preserves the recorded zero; SWITCH matches 0. |
| 3 | Several candles | No explicit numeric pattern matches, so the default applies. |

This is a count-label rule, not quantity validation: a negative number or a fraction would also fall through to Several candles. Reject or flag invalid counts separately before that label drives an order. IF({Candles}, ...) alone isn't a safe missing-value test when 0 must remain a valid answer.
Normalize typed text before matching it
Single select options constrain the input labels. A free-text Cake size field can collect inconsistent capitalization and leading or trailing spaces. If the intended rule ignores those differences, normalize the expression and write the patterns in the normalized form:
SWITCH(
LOWER(TRIM({Cake size})),
"small", "Serves eight",
"large", "Serves twenty",
"Ask the baker"
)
TRIM removes surrounding whitespace and LOWER makes text lowercase. The example input Large becomes large and returns Serves twenty. This doesn't remove spaces inside a name, correct a typo such as Lrage, or decide whether two distinct labels should mean the same thing. Use a single select when the choices should be controlled at entry.
Keep ranges and combined conditions explicit with IF
SWITCH is an equality map. A pattern such as >= 10 isn't a complete value or condition. To label continuous numeric bands, use ordered IF thresholds, as in Airtable's range-bucketing guidance. This example expects Quantity to be a whole-number count and catches empty and negative inputs first:
IF(
BLANK() = CONCATENATE({Quantity}, ""), "Enter quantity",
IF({Quantity} < 0, "Check quantity",
IF({Quantity} < 10, "Small batch",
IF({Quantity} < 50, "Standard batch", "Large batch")
)
)
)
Counts 0–9 return Small batch, 10–49 return Standard batch, and 50 upward return Large batch. Each threshold is reached only after the previous one failed, so there are no gaps between the bands. Add an integer-validity check if fractional counts can enter this field. Don't write a chained comparison such as 0 < {Quantity} < 10; use separate comparisons with AND when both bounds are needed.
When two fields decide an answer, put both tests in the condition. With a Paid checkbox, IF(AND({Status} = "Ready", {Paid}), "Release order", "Hold order") returns Release order only when the status is Ready and Paid is checked. The IF and AND definitions support that arrangement. The wider IF, AND and OR guide covers more conditional branches.
Don't assume a spreadsheet's SWITCH(TRUE(), condition, result, ...) recipe transfers to Airtable. A community thread reports problems with Boolean SWITCH patterns, including a later regex example. That isn't a current specification for every possible Boolean expression; the documented IF route gives these conditions a clear, maintainable home. Airtable's current function reference lists IF and SWITCH, but not IFS.
Put a condition inside one result when only that case needs it
A SWITCH result can itself be a formula, as confirmed in Airtable's function announcement. If only Ready needs the payment check, keep the other status mappings flat:
SWITCH({Status},
"New", "Order taken",
"Baking", "In the oven",
"Ready", IF({Paid}, "Release order", "Take payment"),
"Picked up", "Collected",
"Check status"
)
The outer function selects Ready; the inner IF chooses between its two instructions. Avoid nesting more SWITCH functions merely to imitate a lookup across other records.
Move a changing calculation into the expression
The expression can be calculated too. In a reported invoice-year problem, calculated pattern arguments wouldn't save; the accepted solution calculated the year difference once and matched plain numbers. For an Invoice year number field, this guarded version returns text:
IF(
BLANK() = CONCATENATE({Invoice year}, ""), "Enter invoice year",
SWITCH(YEAR(TODAY()) - {Invoice year},
0, "Current year",
1, "Previous year",
2, "Two years prior",
"Other year"
)
)
The fallback says Other year because a future year also falls outside 0, 1 and 2. I'd keep literal patterns here rather than hard-code calendar years that someone has to update annually. This doesn't establish that every computed pattern is unsupported; it avoids the particular problem reported in that thread.
Use relationships when one input contains several values
SWITCH returns one result for the expression as a whole. It doesn't visit each selected item and map it independently. In the multi-select discussion, matching Option 1 alone didn't cover Option 1 together with Option 2, and reversing the displayed order required another combination. Enumerating combinations becomes difficult to maintain.
For a changing mapping list, I'd keep the options and their outputs as records in a reference table. In the bakery example, a Packaging options table could hold one record per option, with a separate Counter instruction field. Link Orders to the relevant options, then use a lookup to bring back their instructions. Two linked options produce two instructions without an extra SWITCH branch for every pairing.
A formula can read fields in its own record; it can't search a different record or table directly. Airtable documents linked records, lookups and rollups as the route for bringing those values into the current record. If a lookup already supplies your SWITCH input, check how many linked records it represents. Converting several values to one text string doesn't decide which one should control the result. Enforce the intended relationship or deliberately aggregate it; don't silently take the first value. For an unexpected empty or multi-value result, follow the lookup diagnosis.
Find why the result is blank, wrong or won't save
Start by separating a formula that fails validation from a valid formula whose result isn't displayed. Airtable's error guidance identifies syntax, mixed result types and single select formatting as different problems.
| Symptom | Check and action |
|---|---|
| Won't save | Check commas between every argument, paired patterns/results, straight quotes, real field names and balanced parentheses. Write SWITCH( with no space before the opening parenthesis. |
| Every record shows the default | Compare one input with its pattern. Check field type, current option spelling, surrounding spaces and whether a lookup contains several values. |
| Only new options are blank | Check whether the formula omitted a default or needs another mapping. Adding a select option doesn't add a SWITCH branch. |
| Preview is right, grid cell is blank | Open Edit field → Formatting. If Change formula output to single select options is on, add the missing output option and a fallback, or turn the setting off to display plain text. |
| Currency or numeric formatting is missing | Remove quoted numbers and text defaults from a numeric mapping. Keep all nonblank results numeric; use VALUE only for numeric text that genuinely needs conversion. |
| Zero is labelled as missing | Replace a truthiness-only number guard with the documented text-conversion blank check above. |
The display fallback and the SWITCH default solve different problems. SWITCH first calculates a result; single select formatting then tries to display that result as a predefined option. Without a display fallback, even a calculated Check status can appear blank if no option has that name. Turning off that formatting reveals the raw output; clearing browser data won't repair a missing option.
For circular references or errors in a calculation returned by one branch, use the wider formula error checks. A default handles an unmatched expression; it isn't a general error handler for broken calculations.
Replace nested IFs while preserving the original field
A nested IF is a good conversion candidate when each branch compares the same expression with a fixed value. For the bakery rule, its beginning is IF({Status} = "New", "Order taken", IF({Status} = "Baking", "In the oven", ...)). Each equality test becomes a pattern/result pair and the last else becomes the default. Preserve the old rule in a note before editing.
- Duplicate the original formula field. Open Counter label's dropdown → Duplicate field. Name the copy Counter label SWITCH. Keep the original in place while its existing readers continue to use it.
- Build the new rule in the copy. Use Edit field, replace the formula and click Save. Keep ranges or extra conditions in IF branches. Confirm the output type as well as the wording.
- Compare saved results. Add a temporary Formula field containing
{Counter label} = {Counter label SWITCH}. Equal outputs return 1; differing outputs return 0 under the logical comparison rules. Filter for 0 and investigate each disagreement. - Check cases the existing records don't cover. Include a normal status, an empty input and an unmapped option in a safe example or scratch setup. An all-1 comparison only proves agreement for the records and conditions present; both formulas can share the same missing case.
- Put the accepted formula into the original field. Copy it from the scratch field, open the original Counter label → Edit field, paste and Save. Reopen the saved editor and check its text, formatting and the dependent view or automation conditions before removing anything.

Keeping the original field preserves its references. Deleting it and renaming the scratch copy isn't the same operation: dependencies still refer to the original field. Where available, Show dependencies helps identify those readers. After checking them, delete the temporary comparison field first, then the scratch copy; neither should have acquired permanent readers.
Leave a field description explaining the input, the output type and what the default means. Finish by checking the saved Counter label for Ready, empty and Cancelled records, then open the view or workflow that reads it. The next maintainer should be able to add a status mapping without guessing which field owns the order's status.
