Quick Answer

IFERROR Function

IFERROR catches errors and returns a custom value instead.

✓ Excel✓ Google SheetsExcel Excel 2007 and later

Syntax

IFERROR
(value, value_if_error)

Parameters

ParameterDescriptionRequired
valueThe formula to check for errors.Required
value_if_errorThe value to return if the formula results in an error.Required

Basic Example

Handle division by zero

=IFERROR(A1/B1, "Cannot divide by zero")
ResultCannot divide by zero

Returns "Cannot divide by zero" when B1 is 0.

Advanced Examples

Example 1: Handle VLOOKUP errors

Lookup with fallback

Show friendly message when VLOOKUP fails

=IFERROR(VLOOKUP(A1, B:C, 2, FALSE), "Not found")
Result: Not found
Returns "Not found" when VLOOKUP returns #N/A.

How IFERROR Works

IFERROR evaluates the first argument. If it results in any error (#N/A, #VALUE!, #REF!, etc.), it returns the second argument.

1
Enter formula
Type your formula normally.
2
Wrap with IFERROR
Wrap it with IFERROR and provide a fallback value.
3
Press Enter
The result shows the formula output or fallback.

Important Notes & Limitations

  • IFERROR catches ALL errors.

  • For catching only #N/A errors, use IFNA instead.

Common Errors & Fixes

#VALUE!Missing arguments

Fix: Ensure both arguments are provided.

Download Practice File

Practice IFERROR with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the IFERROR function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

What errors does IFERROR catch?
IFERROR catches #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, #NULL!.
What is the difference between IFERROR and IFNA?
IFERROR catches all errors; IFNA only catches #N/A errors.