ISERROR function

Returns the logical value TRUE if value refers to any error value, such as #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!; otherwise, it returns FALSE.

Syntax

ISERROR(value)

Argument Description Remarks
value The value that you want tested. Value can be a blank (empty) cell, error, logical expression, text, number, reference value, or a name referring to any of these, that you want to test.
  • Value arguments enclosed with quotation marks are treated as text. They are never converted.

Example

The ISERROR function is useful in formulas for testing the outcome of a calculation. When combined with the IF function, it provides a method for locating errors in formulas (see the following examples).

To make the following example easier to understand, you can copy the data to a blank sheet and then enter the function underneath the data. Do not select the row or column headings (1, 2, 3... A, B, C...) when you copy the sample data to a blank sheet.

#REF! #N/A
56  
45  
   
   
Formula Description (Result)
=ISERROR(A1) Checks whether the value refers to any error value (TRUE)
=ISERROR(B1) Checks whether the value refers to any error value (TRUE)
=IF(ISERROR(AVERAGE(A2:B3)),"No Numbers",AVERAGE(A2:B3)) Checks whether the range A2:B3 contains at least one number. Since the range contains numbers, the AVERAGE function does not return an error. This result causes ISERROR to return FALSE, which in turn causes the IF function to return the result of the AVERAGE function (50.5)
=IF(ISERROR(AVERAGE(A4:B5)),"No Numbers",AVERAGE(A4:B5)) Checks whether the range A4:B5 contains at least one number. Since there are no numbers in the range, the AVERAGE function returns the #DIV/0 error value. This result causes ISERROR to return TRUE, which in turn causes the IF function to return the text "No Numbers" (No Numbers)

See also

ERROR.TYPE function

ISBLANK function

ISERR function

ISNA function

ISREF function

TYPE function

List of all functions (by category)

 
 
Applies to:
Excel for Mac 2011