Purpose
Return value
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:
- 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.
ISERROR function examples
Match first error
Get first word
How to fix the #NULL! error
Lookup last file revision
How to fix the #NUM! error
Count errors in all sheets
How to fix the #SPILL! error
Validate strong password
Count cells that do not contain errors
How to fix the #CALC! error
How to fix the #DIV/0! error
Count cells that contain errors
How to fix the #VALUE! error
How to fix the #NAME? error
ISERROR function videos
How to trap errors in formulas
Related functions
ISERR Function
The Excel ISERR function returns TRUE for any error type except the #N/A error. You can use the ISERR function together with the IF function to test for an error and display a custom message, or perform a different calculation if found.
ERROR.TYPE Function
The Excel ERROR.TYPE function returns a number that corresponds to a specific error value. You can use ERROR.TYPE to test for specific kinds of errors. If no error exists, ERROR.TYPE returns #N/A. See below for a key to the error codes returned by ERROR.TYPE. ...
ISBLANK Function
The Excel ISBLANK function returns TRUE when a cell is empty, and FALSE when a cell is not empty. For example, if A1 contains "apple", ISBLANK(A1) returns FALSE.
ISEVEN Function
The Excel ISEVEN function returns TRUE when a value is an even number, and FALSE when a value is an odd number. ISEVEN will return the #VALUE error if a value is not numeric.
ISFORMULA Function
The Excel ISFORMULA function returns TRUE if a cell contains a formula, and FALSE if not. When a cell contains a formula ISFORMULA will return TRUE regardless of the formula's output or error conditions.
ISLOGICAL Function
The Excel ISLOGICAL function returns TRUE when a cell contains the logical values TRUE or FALSE, and returns FALSE for cells that contain any other value, including empty cells.
ISNA Function
The Excel ISNA function returns TRUE when a cell contains the #N/A error and FALSE for any other value, or any other error type. You can use the ISNA function with the IF function test for #N/A and display a friendly message if the error occurs.
ISNONTEXT Function
The Excel ISNONTEXT function returns TRUE when a cell contains any value except text. This includes numbers, dates, times, errors, and formulas that do not return text. ISNONTEXT also returns TRUE when a cell is empty.
ISNUMBER Function
The Excel ISNUMBER function returns TRUE when a cell contains a number, and FALSE if not. You can use ISNUMBER to check that a cell contains a numeric value, or that the result of another function is a number.
ISODD Function
The Excel ISODD function returns TRUE when a value is an odd number, and FALSE when a value is an even number. ISODD will return the #VALUE error if a value is not numeric.
ISREF Function
The Excel ISREF returns TRUE when a cell contains a reference and FALSE if not. You can use the ISREF function to check for a reference in a formula.
ISTEXT Function
The Excel ISTEXT function returns TRUE when a cell contains a text value, and FALSE if the cell contains any other value. You can use the ISTEXT function to check if a cell contains a text value, or a numeric value entered as text.