Skip to content
Excel

IFERROR function in Excel

Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula

=IFERROR(value, value_if_error)

IFERROR syntax and parameters

Two arguments, two required.

  • valueanyRequired

    The argument that is checked for an error.

  • value_if_erroranyRequired

    The value to return if the formula evaluates to an error. The following error types are evaluated: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!.

IFERROR examples

Formulas you'll actually reuse.

  1. A lookup that says so instead of #N/A when the key is missing:

    =IFERROR(VLOOKUP(F2, A2:D200, 4, FALSE), "Not found")

    Result"Not found"

  2. A ratio that reads as zero when the divisor is blank (#DIV/0!):

    =IFERROR(D2 / C2, 0)

    Result0

IFERROR in Google Sheets

Same name — your formula ports as-is.

Try IFERROR in the playground

Edit the example — nothing to install.

Preloaded with the IFERROR formula from Example 1 — change anything and watch it respond.

Loading the editor…