Skip to content
Google Sheets

IFERROR function in Google Sheets

Returns the first argument if it is not an error value, otherwise returns the second argument if present, or a blank if the second argument is absent.

=IFERROR(value, [value_if_error])

IFERROR syntax and parameters

Two arguments, one required.

  • valueanyRequired

    The value to return if value itself is not an error.

  • value_if_erroranyOptional

    [ OPTIONAL - blank by default ] - The value the function returns if value is an error.

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 Excel

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…