How to Use IFERROR in Excel
Catches and replaces formula errors (#N/A, #VALUE!, #DIV/0!) with clean fallbacks or blanks.
What is IFERROR in Microsoft Excel?
IFERROR intercepts any formula error (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?) and returns a custom fallback value (like 0, '-' or 'Not Found') instead of displaying an ugly error code on your executive spreadsheet.
Formula Syntax
Arguments Breakdown
| Argument | Requirement | Purpose & Details |
|---|---|---|
| value | Required | The argument, calculation, or formula to check for errors. |
| value_if_error | Required | The value to return if the formula evaluates to an error. |
When to Use IFERROR (Real-World Business Scenarios)
- 1
Wrapping division calculations like Profit Margin: =IFERROR((Revenue-Cost)/Revenue, 0) to avoid #DIV/0! on zero revenue rows.
- 2
Wrapping legacy VLOOKUP formulas to display '-' instead of '#N/A' on missing inventory SKUs.
- 3
Cleaning executive presentation tables before exporting to PDF or client decks.
Step-by-Step Practical Business Example
Suppose you have the following dataset in Excel cells A1:D4:
| Sales | Units Sold | Average Price |
|---|---|---|
| 50000 | 10 | ₹5,000 |
| 0 | 0 | ₹0 |
| 75000 | 15 | ₹5,000 |
How it works: 0 divided by 0 would produce #DIV/0!, but IFERROR cleanly returns 0 instead.
Common Errors & How to Fix Them
Why it happens: IFERROR suppresses all errors, including formula typos.
Fix: Use IFNA if you only want to catch missing lookup values (#N/A) without masking calculation mistakes.
Try IFERROR Live in Your Browser
No need to launch desktop Excel. Practice formulas with real-time feedback in our HyperFormula sandbox.
Frequently Asked Questions (IFERROR)
What does the IFERROR formula do in Excel?
IFERROR intercepts any formula error (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?) and returns a custom fallback value (like 0, '-' or 'Not Found') instead of displaying an ugly error code on your executive spreadsheet.
What is the syntax for IFERROR?
What are common mistakes when using IFERROR?
Hidden legitimate bugs: IFERROR suppresses all errors, including formula typos. (Use IFNA if you only want to catch missing lookup values (#N/A) without masking calculation mistakes.)
Master IFERROR in Basic Excel
Learn IFERROR along with 500+ formulas, 100+ production workbooks, and verified certificates in our complete 3-Tier curriculum.
