{
  "category": "Logical functions",
  "display_name": "SWITCH",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.SWITCH",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 2,
      "last_bit": 0,
      "matched": 1223,
      "other_mismatch": 0,
      "refused": 2,
      "rows": 1227,
      "unread": 0,
      "worst_ulp": 7318349394477056
    },
    "detail": "Of 1,395 recorded answers (1,227 in the answer bank and 168 workbook cells), 4 do not match: 2 differ by more than 16 ULP, 2 are refused.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 4 of 1,395 recorded answers",
    "workbook_corpus": {
      "cells": 168,
      "matched": 168
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical_more.rs#L90-L102",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical_more.rs#L153-L163",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical_more.rs#L165-L182"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/comparison::Operand::kind",
        "catalogue/comparison::Operand::blank",
        "catalogue/comparison::order",
        "catalogue/comparison::overflow_numbers",
        "catalogue/comparison::numbers",
        "catalogue/comparison::in_band",
        "catalogue/comparison::Rounded::up",
        "catalogue/comparison::Roundings::of",
        "catalogue/comparison::Roundings::disjoint",
        "catalogue/comparison::texts",
        "catalogue/comparison/collation::compare",
        "catalogue/comparison/collation::weighed",
        "catalogue/comparison/collation::measured_iteration_extension",
        "catalogue/comparison/sort_key::table",
        "catalogue/comparison/sort_key::decode64",
        "catalogue/comparison/sort_key::Reader::byte",
        "catalogue/comparison/sort_key::Reader::varint",
        "catalogue/comparison/sort_key::Reader::done",
        "catalogue/comparison/sort_key::in_ranges",
        "catalogue/comparison/sort_key::build",
        "catalogue/comparison/sort_key::han_base",
        "catalogue/comparison/sort_key::derive",
        "catalogue/comparison/sort_key::shared_jamo_tails",
        "catalogue/comparison/sort_key::ordinary_jamo_prefix",
        "catalogue/comparison/sort_key::independent_jamo_suffix",
        "catalogue/comparison/sort_key::jamo_leading_primary",
        "catalogue/comparison/sort_key::leading_order",
        "catalogue/comparison/sort_key::Before::separate_special",
        "catalogue/comparison/sort_key::Gathered::kana",
        "catalogue/comparison/sort_key::Gathered::unit",
        "catalogue/comparison/sort_key::parts",
        "catalogue/comparison/sort_key::diacritic_order",
        "catalogue/comparison/sort_key::diacritics",
        "catalogue/logical_more::selected",
        "catalogue/logical_more::selection",
        "decimal::low32",
        "decimal::Natural::from_u64",
        "decimal::Natural::pow10",
        "decimal::Natural::normalize",
        "decimal::Natural::is_zero",
        "decimal::Natural::mul_add_small",
        "decimal::Natural::times_pow10",
        "decimal::Natural::times_pow5",
        "decimal::Natural::times_pow2",
        "decimal::ExactDecimal::binary"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/logical_more.rs#L90-L102",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 4 of 1,395 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.SWITCH.json",
  "name": "SWITCH",
  "notes": [
    {
      "basis": "11 recorded selection readings in dynamic-array Excel, each with size observers.",
      "documentation": null,
      "evidence": [
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": null,
          "note": "selection and callable readings pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets fn2_q016 to fn2_q022, fn2_q194, fn2_q195, fn2_q208, fn2_q209",
          "note": "recorded readings",
          "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.IFS",
        "FUNC.SWITCH"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-IFS-001",
      "open": [
        "A selected LAMBDA that is then called, or passed through LET or IFERROR, has not been read in a published capture."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=IFS(TRUE,1,{FALSE,TRUE},{2,3})",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q208, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=SWITCH(2,2,1,{1,2},3)",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q209, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=SWITCH(\"A\",\"a\",1,{\"A\",\"A\"},2)",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q016, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=ISBLANK(IFS(TRUE,Data!Z1))",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "TRUE",
            "kind": "logical"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "Data!Z1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q194, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=ISBLANK(SWITCH(1,1,Data!Z1))",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "TRUE",
            "kind": "logical"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "Data!Z1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q195, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=IFS(TRUE,LAMBDA(xx,xx))",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#CALC!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q017, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=SWITCH(1,1,LAMBDA(xx,xx))",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#CALC!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q018, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=IFS(TRUE,HSTACK(LAMBDA(xx,xx),LAMBDA(xx,xx)))",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "{#CALC!,#CALC!}",
            "kind": "array"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q019, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=IFS(\"2\",{\"hit\",\"hit\"})",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "{#VALUE!,#VALUE!}",
            "kind": "array"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q021, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=SWITCH(#VALUE!,1,{1,2},0)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet fn2_q022, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn2_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "Once a scalar test selects a result, array arguments after it have no effect on the shape: IFS(TRUE,1,{FALSE,TRUE},{2,3}) and SWITCH(2,2,1,{1,2},3) each return one 1, not an array, and SWITCH(\"A\",\"a\",1,{\"A\",\"A\"},2) returns 1 because the match ignores case. The selected value itself is passed on as it is. A selected reference stays a reference: ISBLANK(IFS(TRUE,Data!Z1)) is TRUE over an empty cell. A selected LAMBDA shows as #CALC! in the cell, IFS(TRUE,LAMBDA(xx,xx)), and a selected array of LAMBDAs as #CALC! in each cell. A test that is not TRUE or FALSE gives #VALUE! in the shape of its result: IFS(\"2\",{\"hit\",\"hit\"}) is {#VALUE!,#VALUE!}. A direct error as the SWITCH expression stays one error: SWITCH(#VALUE!,1,{1,2},0) is #VALUE!.",
      "status": "measured",
      "title": "IFS and SWITCH pass on the selected value whole, and later arrays do not lift the call"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- **`IFS`** is the sibling for independent conditions. Use `IFS` when the tests differ in kind; use\n  `SWITCH` when they are all equality against one expression. Both return `#N/A` on no match, but\n  only `SWITCH` has a real default slot.\n- **`IF`** nested is what both replace.\n- **`CHOOSE`** dispatches on a 1-based index rather than on a value match.\n- **`LOOKUP` / `XLOOKUP` / `MATCH`** are the table-driven alternatives, and they are on the *other*\n  side of the equality split recorded in `EV-STRUCT-0001`: `MATCH` and `XMATCH` compare with raw\n  IEEE equality. Replacing a `SWITCH` with an `XLOOKUP` over a two-column table therefore changes\n  the comparison semantics, not just the notation. That is a genuinely surprising migration hazard\n  and the most practical consequence of this page.\n- `SWITCH` arrived in Excel 2016. It supersedes nothing and is not a Compatibility-category entry.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n1. **Compute the default by parity before scanning**, and treat \"is there a default\" as a\n   structural fact of the call, not something discovered mid-loop.\n2. **Do not evaluate candidates or results past the first match.** Lazy evaluation is observable\n   whenever a later argument would error.\n3. **Choose the equality predicate deliberately and document it.** If you share a comparison helper\n   with `=`, `COUNTIF`, and `SUMIF`, `SWITCH` inherits their truncation semantics. If you share one\n   with `MATCH`, it inherits raw IEEE equality. Both are defensible; silently inheriting whichever\n   helper was nearest is not.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns whatever kind the selected result carries.\n\n- **No match, no default.** `#N/A`.\n- **No match, default present.** The default, verbatim.\n- **Numeric matching.** Through the 15-significant-digit truncation predicate described above,\n  not raw IEEE equality.\n- **Kind mismatch.** A number and numeric text do not match each other.\n- **Error as the expression.** Propagates.\n- **Selected result is an error.** Returned verbatim; `SWITCH` selects, it does not inspect.\n- **Arrays.** The call model records `SWITCH` under `ByIndexScalarArrayLift` over positions 0, 1\n  and 3 — the expression, the first candidate, and the first result\n  ([chapter 03](../model/03-call-pipeline.md)). As with `IFS`, that list is irreducible structure\n  rather than a derivable rule. Once a scalar comparison has selected a result, later arrays do\n  not lift the call: `SWITCH(2,2,1,{1,2},3)` returns one `1` (FN-IFS-001).\n\n\n",
    "sources": "- Handbook evidence records `EV-STRUCT-0001` and `EV-STRUCT-0006`\n  (`content/evidence/records/`) — the comparison-tolerance family split and the array-lift\n  structural verification; both group-scoped.\n- Handbook call-model chapters\n  [02 Coercion and lifting](../model/02-coercion-and-lifting.md) and\n  [03 The call pipeline](../model/03-call-pipeline.md).\n- `data/functions/FUNC.SWITCH.json`, `data/presence/FUNC.SWITCH.json`.\n\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 4,151 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.SWITCH.json).",
    "what-it-does": "\n`SWITCH` evaluates one expression once and compares it, in order, against a list of candidate\nvalues, returning the result paired with the first candidate that matches. If nothing matches, it\nreturns an optional trailing default — and if there is no default, `#N/A`.\n\nThe rule:\n\n1. Evaluate `expression` once.\n2. Walk the `(valueN, resultN)` pairs left to right. For each, test `expression = valueN` under the\n   function's equality predicate.\n3. On the first match, return `resultN` and stop.\n4. If no candidate matched, return `default` if one was supplied, otherwise `#N/A`.\n\nTwo things make `SWITCH` more interesting than \"`IFS` with an implicit `=`\".\n\n**Parity decides the default.** There is no keyword marking the default argument. `SWITCH` counts:\nthe expression takes one slot, and candidate/result pairs take two each, so an *even* total\nargument count means the last argument is unpaired and is therefore the default. An odd total\nmeans every candidate has a result and there is no default. Nothing in the formula text says\n\"default\" — the argument count says it. Miscount the pairs and a value you meant as a candidate\nbecomes the default, silently.\n\nIf you take one thing from this page: `SWITCH` is a *comparison* function wearing dispatch\nclothing, and its comparison is the same tolerant-looking one the `=` operator and `COUNTIF` use,\nnot the exact one lookup functions use.\n\n\n\n### Arguments\n\n\n`SWITCH(expression, value1, result1, [value2, result2], ..., [default])`\n\n- **`expression`** — required. Evaluated once. Any value kind.\n- **`default`** — optional, and identified only by argument parity as described above.\n\nThe commonly misunderstood positions are the last two: readers assume a named default and assume\nthat a numeric candidate matches a numeric-looking *text* expression. It does not — the reference\nengine matches text against text and numbers against numbers, and does not cross the kind\nboundary.\n\n\n"
  },
  "signature": {
    "display": "SWITCH(expression, value1, result1, ...)",
    "parameters": [
      {
        "description": null,
        "name": "expression",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "value1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "result1",
        "optional": false,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 254,
        "min": 3
      },
      "category": "Logical functions",
      "classification": {
        "arg_preparation_profile": "RefsVisibleInAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "SelectorBranch",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "The result paired with the first value that equals the expression, or a default",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned.",
        "microsoft_url": "https://support.microsoft.com/en-us/office/switch-function-47ab33c0-28ce-4530-8a45-d532ec4aa25e"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "SWITCH"
        },
        {
          "locale": "bg-BG",
          "name": "SWITCH"
        },
        {
          "locale": "cs-CZ",
          "name": "SWITCH"
        },
        {
          "locale": "da-DK",
          "name": "SKIFT"
        },
        {
          "locale": "de-DE",
          "name": "SWITCH"
        },
        {
          "locale": "el-GR",
          "name": "SWITCH"
        },
        {
          "locale": "en-AU",
          "name": "SWITCH"
        },
        {
          "locale": "en-GB",
          "name": "SWITCH"
        },
        {
          "locale": "en-US",
          "name": "SWITCH"
        },
        {
          "locale": "es-ES",
          "name": "CAMBIAR"
        },
        {
          "locale": "et-EE",
          "name": "SWITCH"
        },
        {
          "locale": "fi-FI",
          "name": "MUUTA"
        },
        {
          "locale": "fr-FR",
          "name": "SI.MULTIPLE*"
        },
        {
          "locale": "he-IL",
          "name": "SWITCH"
        },
        {
          "locale": "hr-HR",
          "name": "SWITCH"
        },
        {
          "locale": "hu-HU",
          "name": "ÁTVÁLT"
        },
        {
          "locale": "id-ID",
          "name": "SWITCH"
        },
        {
          "locale": "it-IT",
          "name": "SWITCH"
        },
        {
          "locale": "ja-JP",
          "name": "SWITCH"
        },
        {
          "locale": "ko-KR",
          "name": "SWITCH"
        },
        {
          "locale": "lt-LT",
          "name": "SWITCH"
        },
        {
          "locale": "lv-LV",
          "name": "SWITCH"
        },
        {
          "locale": "nb-NO",
          "name": "SWITCH"
        },
        {
          "locale": "nl-NL",
          "name": "SCHAKELEN"
        },
        {
          "locale": "pl-PL",
          "name": "PRZEŁĄCZ"
        },
        {
          "locale": "pt-BR",
          "name": "SWITCH"
        },
        {
          "locale": "pt-PT",
          "name": "PARÂMETRO"
        },
        {
          "locale": "ro-RO",
          "name": "SWITCH"
        },
        {
          "locale": "ru-RU",
          "name": "ПЕРЕКЛЮЧ"
        },
        {
          "locale": "sk-SK",
          "name": "SWITCH"
        },
        {
          "locale": "sl-SI",
          "name": "SWITCH"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "SWITCH"
        },
        {
          "locale": "sv-SE",
          "name": "VÄXLA"
        },
        {
          "locale": "th-TH",
          "name": "SWITCH"
        },
        {
          "locale": "tr-TR",
          "name": "İLKEŞLEŞEN"
        },
        {
          "locale": "uk-UA",
          "name": "SWITCH"
        },
        {
          "locale": "vi-VN",
          "name": "SWITCH"
        },
        {
          "locale": "zh-CN",
          "name": "SWITCH"
        },
        {
          "locale": "zh-HK",
          "name": "SWITCH"
        },
        {
          "locale": "zh-TW",
          "name": "SWITCH"
        }
      ],
      "signature": {
        "display": "SWITCH(expression, value1, result1, ...)",
        "parameters": [
          {
            "description": null,
            "name": "expression",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "value1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "result1",
            "optional": false,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "SWITCH",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": "https://support.microsoft.com/en-us/office/switch-function-47ab33c0-28ce-4530-8a45-d532ec4aa25e"
  },
  "try_it": {
    "formula": "=SWITCH(2,2,1,{1,2},3)"
  },
  "url": "https://handbook.dnacalc.com/functions/SWITCH.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "=SWITCH(2,2,1,{1,2},3) returned 1 (0x3ff0000000000000). =SWITCH(\"A\",\"a\",1,{\"A\",\"A\"},2) returned 1 (0x3ff0000000000000). 3 further recorded controls are attached. Inputs were supplied through cells using Value2, formula literals. These are controls from this environment, not a same-input comparison with another build.",
      "excel_build": "16.0.20527.20088",
      "observations": [
        {
          "call": "=SWITCH(2,2,1,{1,2},3)",
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=SWITCH(\"A\",\"a\",1,{\"A\",\"A\"},2)",
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=ISBLANK(SWITCH(1,1,Data!Z1))",
          "excel": {
            "bits": null,
            "display": "TRUE",
            "kind": "logical"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "Data!Z1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=SWITCH(1,1,LAMBDA(xx,xx))",
          "excel": {
            "bits": null,
            "display": "#CALC!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=SWITCH(#VALUE!,1,{1,2},0)",
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        }
      ],
      "platform": "Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-IFS-001.json"
      ]
    },
    {
      "behaviour": "4,151 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.SWITCH.json"
      ]
    }
  ]
}