Excel functions / Information

ERROR.TYPE function

A number for the kind of error: 2 #DIV/0!, 3 #VALUE!, 4 #REF!, 5 #NAME?, 6 #NUM!, 7 #N/A.

Syntax

=ERROR.TYPE(error_val)

Arguments

When to use it

ERROR.TYPE gives a number for an error: 1 #NULL!, 2 #DIV/0!, 3 #VALUE!, 4 #REF!, 5 #NAME?, 6 #NUM!, 7 #N/A. For anything that is not an error it gives #N/A itself. It is used to show a different message for each kind of error.

Examples

  1. The kind of error

    ABCD
    1SalesUnits
    250002

    In D2: =ERROR.TYPE(A2/B2) → 2

    Try this example

  2. A message for each kind

    ABCD
    1SalesUnits
    25000No units yet

    In D2: =IFERROR(CHOOSE(ERROR.TYPE(A2/B2), "", "No units yet", "Not a number"), "OK") → No units yet

    Try this example

Common mistakes

ERROR.TYPE in other languages

Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.

Translate a whole formula

Try ERROR.TYPE in the playground

Related functions