Description
Use this function to determine if a cell has any type of error flag. Supported in Chains.
This includes the #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL! errors.
Syntax
ISERROR(value)
Inputs
This function has the following arguments:
| Name | Required | Description | Valid Input |
|---|---|---|---|
value |
Yes | The cell that you want to evaluate. | A reference to a cell, or a formula which results in one. |
Examples
Sample data
| A | B | |
|---|---|---|
| 1 | Item | Value |
| 2 | red | 56 |
| 3 | green | 39 |
| 4 | orange | 15 |
| 5 | red | 92 |
| 6 | blue | 22 |
Sample formulas
| Use case | Formula | Explanation and Result |
|---|---|---|
| Check to see if the specified cell contains an error. | =ISERROR(A1) |
This formula works in the following manner:
For this data set this formula returns FALSE. (Because cell A1 is empty.) |
| Check to see if the specified cell contains an error. | =ISERROR(B1) |
This formula works in the following manner:
For this data set this formula returns TRUE (because cell B1 contains a #N/A! error) |
| Check to see if the specified cell contains an error. | =ISERROR(A2) |
This formula works in the following manner:
For this data set this formula returns FALSE. (Because cell A1 contains "green".) |
| Check to see if any of a set of cells contains an error. | =IF(OR(ISERROR(A1),ISERROR(B1),ISERROR(C1)),"An error happened") |
This formula works in the following manner:
For this data set this formula returns An error happened. (Because cell B1 contains a #N/A! error.) |
Notes
- Cell ranges aren't supported.
- You can join multiple instances of ISERROR to check if any of a set of cells is blank:
=IF(OR(ISERROR(A1),ISERROR(B1),ISERROR(C1)),"An Error happened",SUM(A1:C1))
Because will return TRUE if any supplied value is TRUE, the formula will display "An error happened" if any of the cells identified with an function return TRUE.
Tips
You can use ISERROR as follows:
- To trap an error and perform a calculation, is a cleaner approach.
- You can combine ISERROR with the function to reverse the logic to "is not an error". Example:
=NOT(ISERROR(A1))
Related functions
COUNT
COUNTA
COUNTBLANK
COUNTIF
COUNTIFS
ISBLANK
ISERROR
ISNA
ISNUMBER
VALUE