Hide errors with IFERROR
Show a clean value instead of #DIV/0!, #N/A or other errors.
The formula
Excel and Google Sheets
=IFERROR(B2/C2, 0)How it works
B2/C2The calculation that might fail, here a division that errors when C2 is 0 or empty.
0What to show instead of the error. Use "" for an empty-looking cell.
Example
| B: Revenue | C: Units | D: Result |
|---|---|---|
| 500 | 20 | 25 |
| 300 | 0 | 0 |
| 120 | 0 |
Tips
- IFERROR hides every error, including real mistakes. Use IFNA to hide only "not found" from lookups.