{
  "category": "Information functions",
  "display_name": "ERROR.TYPE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.ERROR.TYPE",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1227,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1227,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,227 in the answer bank and 41 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,268 recorded answers",
    "workbook_corpus": {
      "cells": 41,
      "matched": 41
    }
  },
  "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/information.rs#L115-L115",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/information.rs#L450-L483"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/aggregate::reader",
        "catalogue/aggregate::read_reference",
        "catalogue/information::unary",
        "catalogue/information::scalar",
        "catalogue/information::known",
        "catalogue/information::each",
        "catalogue/information::n",
        "catalogue/information::n_of",
        "catalogue/information::referenced"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/information.rs#L115-L115",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,268 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.ERROR.TYPE.json",
  "name": "ERROR.TYPE",
  "notes": [
    {
      "basis": "Four recorded readings of one cell holding #BUSY!.",
      "documentation": null,
      "evidence": [
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "delivered_fn4_busy_error_is_typed_through_the_application",
          "note": "recorded answers pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets q093 to q096",
          "note": "recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4.capture.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.ERROR.TYPE"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-ERROR.TYPE-001",
      "open": [],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=ERROR.TYPE(B1)",
          "correct": null,
          "excel": {
            "bits": "0x0000000000000000",
            "display": "0",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "#BUSY!",
                "kind": "error"
              }
            }
          ],
          "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 q095, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=ISERROR(B1)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "TRUE",
            "kind": "logical"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "#BUSY!",
                "kind": "error"
              }
            }
          ],
          "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 q094, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=IFERROR(B1,7)",
          "correct": null,
          "excel": {
            "bits": "0x401c000000000000",
            "display": "7",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "#BUSY!",
                "kind": "error"
              }
            }
          ],
          "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 q096, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=N(B1)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#BUSY!",
            "kind": "error"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "#BUSY!",
                "kind": "error"
              }
            }
          ],
          "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 q093, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4.capture.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "With #BUSY! in the referenced cell, ERROR.TYPE gives 0, not one of its numbers for an error and not #N/A. The cell still counts as an error elsewhere: ISERROR is TRUE and IFERROR takes its fallback.",
      "status": "measured",
      "title": "ERROR.TYPE of #BUSY! is 0"
    }
  ],
  "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- **`ISERROR` / `ISERR` / `ISNA`** answer *whether*; `ERROR.TYPE` answers *which*. The idiomatic\n  pairing is `IF(ISERROR(x), CHOOSE(ERROR.TYPE(x), \"…\", \"…\", …), x)`, and the guard is not\n  optional for the reason given above.\n- **`TYPE`** returns `16` for every error without distinguishing them; `ERROR.TYPE` is its\n  refinement.\n- **`IFERROR` / `IFNA`** replace the whole diagnostic pattern when you only want a fallback\n  rather than a message. `ERROR.TYPE` survives because a fallback is not a diagnosis: a\n  monitoring sheet that reports *how many* `#REF!`s appeared after a restructure needs the code,\n  not a substitute value.\n- **`NA()`** manufactures the value that maps to `7`.\n- **`ERROR.TYPE`'s ordering and Excel's error precedence** are the same sequence; a page or a\n  test that needs the precedence order can read it off this table.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n\n1. **Emit the published numbers literally.** The codes are Excel's, not an internal enum's\n   ordinals, and the mapping must not drift if the internal enum is reordered.\n2. **The \"anything else\" row must return `#N/A`, not `0` and not an error of its own.** The\n   temptation to return `0` for \"no error\" is strong and wrong.\n3. **Decide the array question explicitly.** Whole-argument classification and elementwise\n   lifting are both defensible; the documentation settles neither, so whichever is chosen should\n   be recorded as a decision awaiting evidence.\n4. **Any error code the engine can produce but cannot name must fall to `#N/A` deliberately.**\n   Silently returning a made-up number for `#SPILL!` would be worse than the documented gap.\n   `#BUSY!` is the recorded exception: Excel gives it `0` (FN-ERROR.TYPE-001).\n5. **The error must reach the kernel** rather than being short-circuited by the dispatch layer.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Number` for an error input (1–8, or `0` for `#BUSY!`; see FN-ERROR.TYPE-001), or the\n`Error` `#N/A` for everything else.\n\n- **Errors do not propagate through this function.** Like the IS classifiers, `ERROR.TYPE`\n  inspects rather than forwards, and that is what makes it usable at all.\n- **`#N/A` in, `7` out.** The one input for which the function's success value and its failure\n  value are related — and the reason the guard is needed.\n- **Empty, text, numbers, logicals: `#N/A`.** All \"anything else\".\n\n\n\n### Errors\n\n\n`ERROR.TYPE` returns `#N/A` as its ordinary \"not an error\" answer — that is a result, not a\nfailure.\n\nNote that the function can never return `#VALUE!` from a *value* — every value has an answer.\n\n\n",
    "sources": "- Microsoft, \"ERROR.TYPE function\" —\n  <https://support.microsoft.com/en-us/office/error-type-function-10958677-7c8d-44f7-ae77-b9a9ee6eefaa>.\n  Read for this page: the syntax, the `error_val` argument description verbatim, the full code\n  table including the \"Anything else\" row, and the usage sentence recommending the `IF` guard.\n- Microsoft, \"IS functions\" —\n  <https://support.microsoft.com/en-us/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665>.\n  Read for the `ISERROR` row, whose seven-code enumeration omits `#GETTING_DATA`.\n- Handbook, [the value universe](../model/01-value-universe.md) — the fourteen modeled error\n  codes and the legacy/extended split.\n- Handbook, [coercion and lifting](../model/02-coercion-and-lifting.md) — the propagation\n  discipline and the inspection functions' exemption.\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 | 1,227 |\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.ERROR.TYPE.json).",
    "what-it-does": "\n`ERROR.TYPE(error_val)` maps an error value to a number identifying its code, and returns `#N/A`\nfor anything that is not an error.\n\nMicrosoft's table, verbatim:\n\n| Error value | Number |\n|---|---|\n| `#NULL!` | 1 |\n| `#DIV/0!` | 2 |\n| `#VALUE!` | 3 |\n| `#REF!` | 4 |\n| `#NAME?` | 5 |\n| `#NUM!` | 6 |\n| `#N/A` | 7 |\n| `#GETTING_DATA` | 8 |\n| Anything else | `#N/A` |\n\nTwo features of this table are worth pausing on.\n\n**The last row is a deliberate confusion.** `ERROR.TYPE(5)` returns `#N/A`, and `ERROR.TYPE(#N/A)`\nreturns `7`. The function answers \"this is not an error\" by producing an error, which means the\nnaive test `ERROR.TYPE(x) > 0` cannot distinguish \"no error\" from \"the error is `#N/A`\". Guard\n`ERROR.TYPE` with `ISERROR` or `ISNA` before trusting its result — Microsoft's own description\nrecommends exactly that pattern: \"You can use ERROR.TYPE in an IF function to test for an error\nvalue and return a text string, such as a message, instead of the error value.\"\n\n**`#GETTING_DATA` has a code but no `ISERROR` sentence.** Microsoft's `ISERROR` row enumerates\nseven codes and stops at `#N/A`; this table adds an eighth. The two documentation pages were\nwritten at different times and the Handbook does not know which is currently true of the running\nproduct for that code.\n\n\n\n### Arguments\n\n\n`error_val` — required, exactly one. The published signature is `ERROR.TYPE(error_val)`.\n\nMicrosoft's argument description: \"The error value whose identifying number you want to find.\nAlthough error_val can be the actual error value, it will usually be a reference to a cell\ncontaining a formula that you want to test.\"\n\nThat sentence describes the normal use. `ERROR.TYPE(A1)` where `A1` holds a broken formula is\nhow the function is meant to be called; `ERROR.TYPE(#DIV/0!)` with a literal error is legal and\nmostly appears in tests.\n\n"
  },
  "signature": {
    "display": "ERROR.TYPE(error_val)",
    "parameters": [
      {
        "description": null,
        "name": "error_val",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Information functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "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": "Number identifying which error value a cell holds",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns a number corresponding to an error type",
        "microsoft_url": "https://support.microsoft.com/en-us/office/error-type-function-10958677-7c8d-44f7-ae77-b9a9ee6eefaa"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "bg-BG",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "cs-CZ",
          "name": "CHYBA.TYP"
        },
        {
          "locale": "da-DK",
          "name": "FEJLTYPE"
        },
        {
          "locale": "de-DE",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "el-GR",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "en-AU",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "en-GB",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "en-US",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "es-ES",
          "name": "TIPO.DE.ERROR"
        },
        {
          "locale": "et-EE",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "fi-FI",
          "name": "VIRHEEN.LAJI"
        },
        {
          "locale": "fr-FR",
          "name": "TYPE.ERREUR*"
        },
        {
          "locale": "he-IL",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "hr-HR",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "hu-HU",
          "name": "HIBA.TÍPUS"
        },
        {
          "locale": "id-ID",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "it-IT",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "ja-JP",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "ko-KR",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "lt-LT",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "lv-LV",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "nb-NO",
          "name": "FEILTYPE"
        },
        {
          "locale": "nl-NL",
          "name": "TYPE.FOUT"
        },
        {
          "locale": "pl-PL",
          "name": "NR.BŁĘDU"
        },
        {
          "locale": "pt-BR",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "pt-PT",
          "name": "TIPO.ERRO"
        },
        {
          "locale": "ro-RO",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "ru-RU",
          "name": "ТИП.ОШИБКИ"
        },
        {
          "locale": "sk-SK",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "sl-SI",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "sv-SE",
          "name": "FEL.TYP"
        },
        {
          "locale": "th-TH",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "tr-TR",
          "name": "HATA.TİPİ sonucu"
        },
        {
          "locale": "uk-UA",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "vi-VN",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "zh-CN",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "zh-HK",
          "name": "ERROR.TYPE"
        },
        {
          "locale": "zh-TW",
          "name": "ERROR.TYPE"
        }
      ],
      "signature": {
        "display": "ERROR.TYPE(error_val)",
        "parameters": [
          {
            "description": null,
            "name": "error_val",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "ERROR.TYPE",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": "https://support.microsoft.com/en-us/office/error-type-function-10958677-7c8d-44f7-ae77-b9a9ee6eefaa"
  },
  "try_it": {
    "formula": "=ERROR.TYPE(NA())"
  },
  "url": "https://handbook.dnacalc.com/functions/ERROR.TYPE.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "=ERROR.TYPE(B1) returned 0 (0x0000000000000000). Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.",
      "excel_build": "16.0.20527.20088",
      "observations": [
        {
          "call": "=ERROR.TYPE(B1)",
          "excel": {
            "bits": "0x0000000000000000",
            "display": "0",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "#BUSY!",
                "kind": "error"
              }
            }
          ],
          "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-ERROR.TYPE-001.json"
      ]
    },
    {
      "behaviour": "1,227 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.ERROR.TYPE.json"
      ]
    }
  ]
}