Replace Excel errors with a clean fallback value.
The IFERROR function returns a fallback value whenever a formula evaluates to an error (#DIV/0!, #N/A, #VALUE!, etc.). Its syntax is =IFERROR(value, value_if_error). Essential for clean spreadsheets.
Divide A1 by B1 (which is 0), and if an error occurs, display 0. Enter the formula in C1.
Click cell C1, type your formula and press Enter.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| Numerator | Denominator | Result | |||
| 1 |
11
|
0
|
|||
| 2 | |||||
| 3 | |||||
| 4 | |||||
| 5 | |||||
| 6 |