IFERROR
Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula.
LogicalBeginner EssentialsError Handling & ChecksLogic & Conditions
What it does
Returns a fallback value when a formula results in an error; otherwise returns the formula result.
Syntax
IFERROR(value, value_if_error)
Arguments
value(value) — Expression to evaluate.value_if_error(value) — Returned if value is an error.
Examples
Handle division by zero
Return 0 if A2/B2 errors.
FORMULA
=IFERROR(A2/B2,0)
RESULT
0
SAMPLE DATA
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 10 | 0 |
| 3 | 10 | 2 |