Logical
Modern
IFERROR
Returns a value you specify if a formula produces an error; otherwise returns the formula's result.
Available in All versions (Excel 2007+)
Syntax
IFERROR(value, value_if_error)What it returns
value_if_error when value is an error; otherwise value itself.
Arguments
| Argument | Required | Description |
|---|---|---|
value |
Yes | The value or formula to check for an error. |
value_if_error |
Yes | Value returned if value evaluates to an error. |
Example
| A | |
|---|---|
| 1 | Code |
| 2 | X999 |
→
Result
Not found
The lookup for X999 finds nothing and would show #N/A — IFERROR catches that and returns Not found instead.
=IFERROR(VLOOKUP(A2, Data, 2, FALSE), "Not found")Important to know
Catches all error types (#N/A, #DIV/0!, #VALUE!, …) — can hide real problems; use deliberately.
For #N/A only, IFNA is more precise.


