ISERROR will return 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: 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:

The ISERR function returns TRUE for any error type except the #N/A error. The ISERROR function returns TRUE for any error. The ISNA function returns TRUE for #N/A errors only. The ERROR.TYPE function returns the numeric code for a given error. The IFERROR function traps errors and provides an alternative result. The IFNA function traps #N/A errors and provides an alternative result.

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.