ISERR Function¶
The ISERR function in Excel is used to check whether a value is any error except #N/A. It returns TRUE if the value is an error such as #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!, and FALSE for all non-error values and for the #N/A error. This function is useful when you want to handle errors in formulas while still allowing #N/A to propagate for separate handling with ISNA or IFNA.
Key Features of ISERR:¶
- Returns
TRUEfor any error value except#N/A. - Returns
FALSEfor non-error values (numbers, text, logicals, blanks) and for the#N/Aerror. - Detects
#VALUE!,#REF!,#DIV/0!,#NUM!,#NAME?, and#NULL!errors. - Commonly used with
IFto substitute default values or trigger actions when formula errors occur. - Differs from
ISERROR, which returnsTRUEfor all errors including#N/A. - Allows
#N/Aerrors from failed lookups to be handled separately, preserving the distinction between "not found" and other formula errors.
Syntax:¶
- value: The value or expression you want to test for an error. Typically a cell reference or formula result.
How ISERR Works:¶
ISERRevaluates the provided value or expression.- If the result is an error value other than
#N/A— such as#VALUE!,#REF!,#DIV/0!,#NUM!,#NAME?, or#NULL!— it returnsTRUE. - If the result is
#N/A, it returnsFALSE(unlikeISERROR, which would returnTRUE). - If the result is any non-error value (number, text, logical, blank), it returns
FALSE.
Examples:¶
1. Division by Zero Error:¶
If A1 contains a formula that results in #DIV/0!:
Result:
2. #N/A Error (Not Detected):¶
If A1 contains #N/A:
Result:
3. Valid Number:¶
If A1 contains 100:
Result:
4. #VALUE! Error:¶
If A1 contains a formula that results in #VALUE!:
Result:
5. Conditional Error Handling:¶
Result:
Returns "Calculation error" if the division produces an error (other than #N/A), otherwise returns the result
6. Separating #N/A from Other Errors:¶
=IF(ISERR(VLOOKUP(A1, D:E, 2, FALSE)), "Formula error", IF(ISNA(VLOOKUP(A1, D:E, 2, FALSE)), "Not found", VLOOKUP(A1, D:E, 2, FALSE)))
Result:
7. Combined with NOT for Non-Error Check:¶
Result:
8. Counting Error Cells in a Range:¶
Result:
Notes:¶
ISERRis specifically designed to exclude#N/Afrom its error detection, unlikeISERRORwhich catches all errors.- If you want to catch all errors including
#N/A, useISERRORinstead. - If you only want to detect
#N/Aerrors, useISNA. - For simpler error handling, consider
IFERROR(handles all errors) orIFNA(handles only#N/A). ISERRis part of the IS family of information functions (ISBLANK,ISERR,ISERROR,ISNA,ISNUMBER,ISTEXT,ISLOGICAL, etc.).- When used inside
IF,ISERRallows you to provide fallback values for formula errors while letting#N/Apass through for separate handling.
Applications:¶
- Selective Error Handling: Trap calculation errors like
#DIV/0!or#VALUE!while allowing#N/Ato propagate for lookup-specific handling. - Data Validation: Identify cells with formula errors that need correction, without flagging intentional
#N/Amarkers. - Error Reporting: Count or highlight non-
#N/Aerrors in a dataset for auditing and troubleshooting. - Conditional Formatting: Drive formula-based conditional formatting to highlight cells with calculation errors.
- Robust Formulas: Build layered error handling that distinguishes between "data not found" (
#N/A) and "formula broken" (other errors).
Related Functions:¶
- ISERROR: Returns TRUE if the value is any error, including
#N/A. - ISNA: Returns TRUE only if the value is the
#N/Aerror. - IFERROR: Returns a specified value if a formula evaluates to any error; otherwise returns the formula result.
- IFNA: Returns a specified value if a formula evaluates to
#N/A; otherwise returns the formula result. - ISBLANK: Returns TRUE if the cell is empty.
- ISNUMBER: Returns TRUE if the value is a number.
- ISTEXT: Returns TRUE if the value is text.
- TYPE: Returns a numeric code indicating the data type of a value.
Tip: Use
ISERRwhen you need to handle formula errors separately from lookup failures. A common pattern is to useISERRfor catching calculation errors (like#DIV/0!or#VALUE!) while usingISNAorIFNAto handle missing data fromVLOOKUPorXLOOKUP. If you don't need to distinguish between error types,IFERRORis a simpler alternative that catches everything.