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.
語法
ISERROR(value)
Inputs
This function has the following arguments:
名稱 | 必要 | 說明 | Valid Input |
---|---|---|---|
值 |
是 | The cell that you want to evaluate. | A reference to a cell, or a formula which results in one. |
範例
Sample Data
A | B |
---|---|
|
#N/A! |
綠色 | 39 |
橙色 | 15 |
紅色 | 92 |
藍色 | 22 |
Sample Formulas
公式 | 說明 | 結果 |
---|---|---|
=ISERROR(A1) |
Checks to see if cell A1 contains an error. | TRUE (because A1 is empty) |
=ISERROR(B1) |
Checks to see if cell B1 contains an error. | TRUE (because B1 contains a #N/A! error) |
=ISERROR(A2) |
Checks to see if cell A2 is empty. | FALSE (because A2 contains "green") |
附註
- 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.
提示
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