Skip to content
Excel

ERROR.TYPE function in Excel

Returns a number corresponding to an error type

=ERROR.TYPE(error_val)

ERROR.TYPE syntax and parameters

One argument, one required.

  • error_valanyRequired

    The error value whose identifying number you want to find. Although error_val can be the actual error value, it will usually be a reference to a cell containing a formula that you want to test.

ERROR.TYPE examples

Formulas you'll actually reuse.

  1. Which error a lookup cell holds — 7 is #N/A, 2 is #DIV/0!, 3 is #VALUE!:

    =ERROR.TYPE(F2)

    Result7

  2. A readable label for whatever went wrong in F2:

    =IF(ISERROR(F2), CHOOSE(ERROR.TYPE(F2), "Null", "Div by zero", "Value", "Ref", "Name", "Num", "Not found"), "OK")

    Result"Not found"

ERROR.TYPE in Google Sheets

Same name — your formula ports as-is.

Try ERROR.TYPE in the playground

Edit the example — nothing to install.

Preloaded with the ERROR.TYPE formula from Example 1 — change anything and watch it respond.

Loading the editor…

ERROR.TYPE errors

What they mean — and the fixes.

  • #N/A

    The referenced cell holds no error at all — guard with ISERROR before calling ERROR.TYPE.