Google Sheets function · Info
ISERROR in Google Sheets: syntax and examples
ISERROR checks whether a value or formula result is an error and returns TRUE or FALSE. It is the test behind many manual fallbacks, usually inside IF.
Syntax
ISERROR(value)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
value | any | yes | The value or expression to test. Any error type counts, including #N/A. |
Examples
The examples use this table, starting in A1:
| Total | Count |
| 100 | 4 |
| 50 | 0 |
| 75 | n/a |
| 20 | 5 |
=ISERROR(A3/B3)Result: TRUE
Dividing by zero gives #DIV/0!, so the answer is TRUE.
Run in a Google Sheet (English US locale) on .
=ISERROR(A2/B2)Result: FALSE
A valid division is not an error: FALSE.
Run in a Google Sheet (English US locale) on .
=IF(ISERROR(A4/B4),"check input",A4/B4)Result: check input
Show a note instead of the error. Here the text in B4 makes the division fail.
Run in a Google Sheet (English US locale) on .
=ARRAYFORMULA(ISERROR(A2:A5/B2:B5))Result:
| FALSE |
| TRUE |
| TRUE |
| FALSE |
Tests every row at once and returns a column of TRUE and FALSE.
Run in a Google Sheet (English US locale) on .
=SUMPRODUCT(--ISERROR(A2:A5/B2:B5))Result: 2
Counts the broken rows: the -- turns TRUE and FALSE into 1 and 0.
Run in a Google Sheet (English US locale) on .
Common errors
- ISERROR catches every error type, #N/A too. ISERR leaves #N/A out, so ISERROR(NA()) is TRUE and ISERR(NA()) is FALSE.
- It also catches typos: a misspelled function gives #NAME?, and ISERROR turns it into a quiet TRUE. Test the inner formula alone first.
- Text that only looks like an error, such as "#N/A", is not an error: ISERROR returns FALSE.
- ISERROR only answers TRUE or FALSE. For a fallback value in one step, IFERROR is shorter than IF with ISERROR.
Compared with Excel
Same syntax as Excel ISERROR.