The IFERROR function is used to handle errors in formulas and display a custom message instead of error values like:
#N/A#DIV/0!#VALUE!#REF!#NAME?#NUM!
It makes reports cleaner and more professional.
Structure of IFERROR
=IFERROR(value, value_if_error)
Arguments:
- value → The formula to evaluate
- value_if_error → What to display if an error occurs
Example 1: Handle Division Error
If:
A1 = 100
B1 = 0
Formula:
=A1/B1
Result: #DIV/0!
Using IFERROR:
=IFERROR(A1/B1, "Invalid Calculation")
Result: Invalid Calculation
Example 2: Handle VLOOKUP Error
=IFERROR(VLOOKUP(A2, A5:C10, 2, FALSE), "Not Found")
If value is not found, it shows “Not Found” instead of #N/A.
Example 3: Return Blank Instead of Error
=IFERROR(A1/B1, "")
This shows a blank cell instead of an error.
Why Use IFERROR?
- Makes reports clean and readable
- Improves user experience
- Prevents confusing error messages
- Useful in dashboards and professional reports
Important Notes
- IFERROR handles all types of errors
- If there is no error, it returns normal result
- Use carefully — do not hide important calculation mistakes
Advanced Example
=IFERROR(INDEX(B5:B10, MATCH(A2, A5:A10, 0)), "Record Not Found")
This prevents errors in lookup formulas.
Conclusion
The IFERROR function is essential for professional Excel reports. It improves data presentation and prevents error messages from confusing users.