IFERROR Function
IFERROR catches errors and returns a custom value instead.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| value | The formula to check for errors. | Required |
| value_if_error | The value to return if the formula results in an error. | Required |
Basic Example
Handle division by zero
=IFERROR(A1/B1, "Cannot divide by zero")Returns "Cannot divide by zero" when B1 is 0.
Advanced Examples
Example 1: Handle VLOOKUP errors
Lookup with fallbackShow friendly message when VLOOKUP fails
=IFERROR(VLOOKUP(A1, B:C, 2, FALSE), "Not found")How IFERROR Works
IFERROR evaluates the first argument. If it results in any error (#N/A, #VALUE!, #REF!, etc.), it returns the second argument.
Important Notes & Limitations
IFERROR catches ALL errors.
For catching only #N/A errors, use IFNA instead.
Common Errors & Fixes
#VALUE!Missing argumentsFix: Ensure both arguments are provided.
Download Practice File
IFERROR
iferrorPractice 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.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps
Related Tutorials
Excel N/A Error Fix
The complete Excel N/A error fix guide: why #N/A appears in VLOOKUP and XLOOKUP, how to repair the root cause, and when to wrap it with IFNA or IFERROR.
Excel VALUE! Error Fix
The #VALUE! error means Excel expected a number but found text. Learn how to fix an excel value error fix fast using IFERROR, VALUE, and clean data checks.