Logical

IFERROR.

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

Logical

How it works.

The IFERROR function catches and handles errors in a formula. It is especially useful for hiding messy error values like #DIV/0!, #N/A, or #VALUE! and replacing them with a custom message, empty string, or 0.

💡 In simple terms.

Runs a formula, but if the formula fails (like a division by zero error), it gives a clean default value instead of Excel's ugly errors.

Analogy

"Think of this like a protective shield. If your math equation tries to divide by zero and would explode with a weird error, the shield turns it into a friendly 0."

Syntax guide.

=IFERROR(value, value_if_error)

Parameters

valueRequired

The formula, expression, or cell reference to check for an error.

value_if_errorRequired

The value to return if the formula evaluates to an error.

Interactive formula builder.

Fill in the input arguments below to construct your custom formula string. Copy it directly to paste into your Excel spreadsheets.

Generated Output

Best Practices

  • Use an empty string "" as the value_if_error to make error rows look completely clean and blank.
  • Wrap lookups (like VLOOKUP) in IFERROR to handle items that are not in your reference tables.

Common Gotchas

  • IFERROR catches *all* errors, including spelling mistakes in your formula names. Be careful as it can hide bugs you actually want to fix.