What it does
IFERROR returns a fallback value when a formula returns an error.
Syntax or pattern
=IFERROR(value, value_if_error)5 practical examples
Hide lookup errors
Return a friendly message when VLOOKUP fails.
=IFERROR(VLOOKUP(A2,Products,3,FALSE),"Not found")This is cleaner than #N/A in report outputs.
Avoid division errors
Return blank when a denominator is zero or missing.
=IFERROR(B2/C2,"")Use this for ratios and percentages.
Show zero for missing values
Return 0 when a calculation fails.
=IFERROR(SUM(D2:F2)/G2,0)Only use zero if it truly means zero in your report.
Clean imported numbers
Convert text to values and return blank if conversion fails.
=IFERROR(VALUE(A2),"")Useful for messy imported data.
Protect nested formulas
Wrap a complex calculation with a readable fallback.
=IFERROR(INDEX(Prices,MATCH(A2,Products,0)),"Check product")The message tells the user what to fix.
Common mistakes to avoid
- Using IFERROR to hide real problems.
- Returning zero when blank would be more accurate.
- Wrapping everything without checking why errors occur.
Related Excel examples
FAQ
Is IFERROR bad practice?
No, but it should not hide important data-quality problems.