ISERR function
The ISERR function in Excel checks whether a value or expression results in any error except #N/A. It returns TRUE if the value is an error (e.g., #DIV/0!, #VALUE!, etc.) and FALSE otherwise.
Syntax:
ISERR(value)
Arguments:
- value: The cell reference, value, or expression you want to check for an error.
Error Types Caught by ISERR:
#DIV/0!(Division by zero)#VALUE!(Invalid value)#REF!(Invalid cell reference)#NAME?(Invalid function or name)#NUM!(Invalid numeric value)#NULL!(Null intersection)
Note: ISERR does not catch the #N/A error. Use ISERROR to catch all error types.
Examples:
Example 1: Division by zero
- Formula:
=ISERR(1/0) - Result:
TRUE(since1/0results in a#DIV/0!error).
Example 2: Valid number
- Formula:
=ISERR(100) - Result:
FALSE(since 100 is not an error).
Example 3: #N/A error
- Formula:
=ISERR(NA()) - Result:
FALSE(since#N/Ais not caught by ISERR).
Use Cases:
- Error Handling: Use in formulas to trap and manage specific errors:
=IF(ISERR(A1/B1), "Error Detected", A1/B1)This avoids Excel’s default error messages and displays custom text instead.
- Condition Checks: Test whether a formula or value results in an error other than
#N/A.
Key Points:
- ISERR vs. ISERROR:
- ISERR excludes
#N/Aerrors. - ISERROR includes all error types.
- ISERR excludes
- Error Trapping: For broader error management, consider IFERROR, which provides an easier way to handle errors:
=IFERROR(A1/B1, "Error")