A single #DIV/0! or #N/A can cascade through a model, breaking every downstream total. Wrapping risky formulas in IFERROR returns a clean fallback — but used wisely, so it hides nothing real.
The example
Divide-by-zero returns 0, not #DIV/0!.
| A | B | |
|---|---|---|
| 1 | Item | Result |
| 2 | 10 / 0 | 0 |
| 3 | 10 / 2 | 5 |
The formula
The formula:
How it works
How it works:
IFERROR(formula, fallback)returns the fallback whenever the formula errors.- Use 0 to keep sums working,
""for a clean blank, or text for a message. - Prefer
IFNAwhen you only want to catch #N/A — so real errors (#REF!, #VALUE!) still surface. - Wrap the whole formula, not just part — and only where an error is genuinely expected.
IFERROR can hide the bug you needed to see. Wrapping everything in IFERROR(…, 0) turns a broken #REF! into a silent zero that quietly corrupts totals. Use it where errors are expected (a lookup that may miss, a divide that may hit zero), and prefer IFNA elsewhere so genuine mistakes still show. Error-proofing should suppress noise, not evidence.
Try it: interactive demo
Numerator and denominator.
Variations
Blank on error
Clean look:
Catch only #N/A
Let real errors show:
Flag the error
Surface it:
Pitfalls & errors
Don’t hide real bugs. Use IFERROR only where an error is expected; IFNA elsewhere.
Fallback affects math. 0 changes averages and sums differently than a blank.
Wrap the whole formula. Partial wrapping can still let an error through.
Practice workbook
Frequently asked questions
How do I error-proof a formula in Excel?
When should I use IFNA instead of IFERROR?
What's the danger of IFERROR?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class