Excel IFERROR Function
IFERROR returns one result when a formula works and a fallback result when that formula returns an error.
Use it to keep reports readable when formulas may divide by zero, miss a lookup match, reference unavailable data, or hit another expected error state.
IFERROR syntax & arguments
Syntax
=IFERROR(value, value_if_error)
-
1
value
RequiredThe formula, expression, or value Excel should evaluate first.
-
2
value_if_error
RequiredThe fallback result to return when
valueevaluates to an error.
Example
=IFERROR(A2/B2, 0)
Return A2 divided by B2, or 0 if the division produces an error.
IFERROR caveats
IFERROR is useful for presentation, but it can also hide formula problems that should be fixed directly.
-
It catches every Excel error type
IFERROR handles errors such as
#N/A,#VALUE!,#DIV/0!,#REF!, and#NAME?. -
It can hide broken logic
A fallback value can make a report look clean while masking a typo, missing reference, or invalid calculation.
-
The first argument still runs
Excel evaluates
valuefirst. IFERROR does not prevent expensive or invalid work; it only controls the returned result. -
Blank fallbacks can be ambiguous
Returning
""keeps a cell visually blank, but it can make real missing data harder to distinguish from valid blanks.
Handling lookup misses? XLOOKUP has an if_not_found argument when you only want to replace missing-match errors.
Intro IFERROR practice problems
No intro IFERROR problems are currently available.
Advanced IFERROR practice problems
Use IFERROR alongside other Excel functions in realistic, less-prescriptive challenges.
Price With Discount
Cleaned Item Code
Code Status Check
Compounded Factors
Order Totals
Quarterly Sales Metric
Shipping Priority Check
VIP Discount Calculation