What is the IFERROR Function
The IFERROR function returns a custom value when a formula produces an error. It is used to hide errors such as #N/A, #VALUE!, or #DIV/0! and replace them with something more meaningful, like a blank, a message, or a default number.
Formula: =IFERROR(value, value_if_error)
Practical Example 1
VLOOKUP may not find a match. Handle it gracefully.
Type: =IFERROR(VLOOKUP(A2, D:E, 2, FALSE), Not Found)
Result: the looked-up value or Not Found
Practical Example 2
Divide two numbers and handle the divide-by-zero error.
Type: =IFERROR(A2/B2, 0)
Result: the division result or 0 if B2 is zero
Practical Example 3
Return a blank string instead of an error.
Type: =IFERROR(A2/B2, )
Result: the result or an empty cell
Practical Example 4
Combine with XLOOKUP's own if_not_found argument for cleaner formulas.
Type: =XLOOKUP(A2, D:D, E:E, Not Found)
Result: the value or Not Found without IFERROR
When to Use It
IFERROR is used in dashboards to hide errors, in lookup formulas to show friendly messages, in financial models to return zeros for missing data, and in any report where an error value would look unprofessional.