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.

1
Evaluate a formula Excel calculates the main value
2
Check for errors Errors trigger the fallback
3
Return a clean result Either the value or replacement

IFERROR syntax & arguments

Syntax

=IFERROR(value, value_if_error)
Required Optional
  1. 1

    value

    Required

    The formula, expression, or value Excel should evaluate first.

  2. 2

    value_if_error

    Required

    The fallback result to return when value evaluates 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 value first. 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.