Excel function

ISERRORfunction

Checks whether a value is an error (including #N/A).

All versions
=ISERROR(A6)
A
B
C
1
2
3
4
5
6
7
8
9
10

Click a cell in the table to change value. Only the error values in A6 and A7 are TRUE. Try breaking it on purpose to see the errors.

Result

TRUE

value
A6You can also click a cell in the table

The cell to test. Click another value in column A.

What is the ISERROR function?

=ISERROR(value)

ISERROR returns TRUE for any error value, #N/A included. It is most often used inside IF to treat values differently by kind.

Column A of the sheet mixes text, numbers, a blank, a logical value, errors and text that looks like a number; column B says what each is. Column C shows the same formula copied down.

ISERROR is TRUE for any kind of error, so it is the tool for counting errors or highlighting them with conditional formatting. If all you need is to replace errors with another value, IFERROR is shorter today.

Arguments

value
The value or cell to test.

ISERROR examples

  1. Example 1. Check for an error

    =ISERROR(A6)

    #N/A, so TRUE.

  2. Example 2. With IF

    =IF(ISERROR(B2/C2), 0, B2/C2)

    Shows 0 if the division fails. Today IFERROR(B2/C2, 0) is shorter.

  3. Example 3. Result for each kind of value

    =ISERROR(A2)

    Every error, #N/A included, is TRUE.

    Value in column A=ISERROR(A2)
    AppleFALSE
    120FALSE
    (blank)FALSE
    TRUEFALSE
    #N/ATRUE
    #DIV/0!TRUE
    "120" (text)FALSE
  4. Example 4. Count the errors

    =SUMPRODUCT(--ISERROR(A2:A10))

    In A2:A10 the result is 2: #N/A and #DIV/0!.

Common mistakes

FAQ

Which errors count?
According to Microsoft: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL!.
How is it different from IFERROR?
ISERROR only returns TRUE/FALSE; IFERROR returns a replacement value directly when there is an error.