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
-
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.
-
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 problem
Solve the intro problem directly here, or open it on its own page.
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