Excel Errors8 min read

Excel IFERROR Formula Examples: When to Use It and When Not To

IFERROR is useful for reports and dashboards, but it can also hide serious spreadsheet problems. Use these examples carefully so your workbook looks clean without becoming misleading.

IFERROR Syntax

=IFERROR(value, value_if_error)

Excel evaluates the first argument. If it returns any error, IFERROR returns the second argument instead. It catches #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL! errors.

Copy-Paste IFERROR Examples

Replace a VLOOKUP #N/A with blank

=IFERROR(VLOOKUP(A2,$F$2:$G$100,2,FALSE),"")

Show a custom lookup message

=IFERROR(XLOOKUP(A2,Products[SKU],Products[Price]),"SKU not found")

Avoid divide-by-zero errors

=IFERROR(A2/B2,0)

Keep dashboard labels clean

=IFERROR(TEXT(B2/C2,"0.0%"),"No data")

Return a check message for bad inputs

=IFERROR(A2*B2,"Check quantity or price")

Wrap INDEX MATCH

=IFERROR(INDEX(ReturnRange,MATCH(A2,LookupRange,0)),"Not found")

Best IFERROR Use Cases

IFERROR is best when an error is expected and harmless. For example, a lookup may not find every SKU, a dashboard percentage may divide by zero when no records exist, or a report may show blank rows until data is entered. In those cases, IFERROR improves readability.

When IFERROR Is Dangerous

IFERROR becomes risky when it hides errors that should be fixed. For example, wrapping every formula in IFERROR(...,0) can make a broken report look accurate. A #REF! error caused by a deleted column should not become zero without investigation. That is how silent spreadsheet errors survive.

IFERROR vs IFNA

If you only want to handle missing lookup results, use IFNA. It catches #N/A but leaves other errors visible. That is safer for lookup-heavy models because a broken reference or misspelled function still appears.

=IFNA(XLOOKUP(A2,SKU,Price),"Not found")

Audit Before You Hide Errors

A good rule is simple: find the error first, then decide whether to hide it. If the cause is acceptable, use IFERROR. If the cause is a broken formula, missing sheet, deleted range, or external link issue, fix the workbook instead.

Find real formula errors before hiding them

Run a free audit for #REF!, #VALUE!, #DIV/0!, and hidden formula issues.

Audit My Spreadsheet