IFERROR
Returns a fallback value when a formula would otherwise show an error.
IFERROR(value, [value_if_error])
IFERROR catches #N/A, #DIV/0! and friends and substitutes something presentable. It is what turns a working sheet into a shareable one.
Arguments
| Argument | Required | What it does |
|---|---|---|
value |
Yes | The formula that might error. |
value_if_error |
Optional | What to show instead. Omitted, you get a blank. |
Worked example
| Region | Rep | Sales |
|---|---|---|
| West | Ana | 1200 |
| East | Ben | 900 |
| West | Cara | 1500 |
| North | Dan | 600 |
| East | Eve | 1100 |
=IFERROR(VLOOKUP("Zoe", B1:C6, 2, FALSE), "No such rep")
Returns No such rep.
Zoe is not in the list, so instead of #N/A the cell explains itself.
Gotchas
- It hides every error, including the ones caused by a genuine mistake in your formula. Build the formula first, wrap it second.
- It does not catch a wrong-but-valid answer — only actual error values.
- XLOOKUP's missing_value argument does the same job without the wrapper.