Summary

The Excel ISERROR function returns TRUE for any error type excel generates, including #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL! You can use ISERROR together with the IF function to test for errors and display a custom message, or run a different calculation when an error occurs.

Purpose 

Test for any error

Return value 

A logical value (TRUE or FALSE)

Syntax

=ISERROR(value)
  • value - The value to check for any error.

How to use 

The ISERROR function returns TRUE for any type of error, including #N/A#VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, #NULL!, #CALC!, and #SPILL! errors. You can use ISERROR together with the IF function to test for errors and display a custom message, or run a different calculation when an error occurs. The ISERROR function takes one argument, value, which is typically a cell reference. 

Examples

ISERROR will return TRUE if A1 contains an error:

=ISERROR(A1) // TRUE if A1 contains an error

You can use the ISERROR function together with the IF function to test for an error and display a custom message if found:

=IF(ISERROR(A1),"custom message") 

To trap an error and perform a different calculation, the IFERROR function is a cleaner approach.

Other error functions

Excel provides a number of error-related functions, each with a different behavior:

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.