value - Required. The formula or expression to check for errors (any Excel formula)
value_if_error - Required. Value to return if an error occurs (text, number, blank "", or formula)
| A | B | C | |
|---|---|---|---|
| 1 | Sales | Target | Achievement |
| 2 | 10000 | 0 | |
| 3 | Formula: | =IFERROR(A2/B2, "No target set") "No target set" |
Shows "Not Found" instead of #N/A when lookup fails
Clean, professional reports without error codes
Returns 0 when dividing by zero or blank cell
Calculations continue without #DIV/0! breaking formulas
Returns empty text "" instead of error
Clean cells without error display, perfect for reports
Protects complex calculations from any error
Shows custom message if any cell has error or issue
Create professional reports where VLOOKUP returns "Not Found" instead of ugly #N/A errors when lookup values are missing. The IFERROR function in Excel wraps VLOOKUP formulas to handle missing data gracefully, essential for customer databases, product catalogs, and sales reports where not all IDs exist in lookup tables. This Excel IFERROR pattern prevents error codes from appearing in executive dashboards and automated reports, maintaining clean presentation even with incomplete reference data.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | ID | Name | Lookup Table: | ID | Name |
| 2 | 101 | 101 | Alice | ||
| 3 | 999 | 102 | Bob | ||
| 4 | Formula: | Not Found | =IFERROR(VLOOKUP(A2,C:D,2,FALSE), "Not Found") |
Calculate achievement percentages safely when targets might be zero or missing. The Excel IFERROR formula prevents #DIV/0! errors in KPI dashboards, sales performance reports, and budget variance analysis where division by zero is possible with incomplete data. This IFERROR pattern is critical for automated monthly reports, financial models with missing baseline data, and performance tracking systems that must display 0% or N/A instead of breaking with division errors.
| A | B | C | |
|---|---|---|---|
| 1 | Employee | Sales | Achievement % |
| 2 | Alice | 5000 | |
| 3 | Bob | 0 | |
| 4 | Formula: | =IFERROR(B2/10000, 0) 0% |
❌ The Problem:
✅ Solution:
=IFERROR(VLOOKUP(...), "Not Found")Use descriptive text for lookup errors like "Not Found", "N/A", or "-" instead of 0. This makes reports clearer and distinguishes errors from legitimate zero values. The IFERROR function in Excel works best with meaningful error messages that help users understand what happened.
❌ The Problem:
✅ Solution:
Test formulas first, add IFERROR lastBuild and test your formula logic first without IFERROR. Only add IFERROR wrapper after the formula works correctly. This way you see real errors during development and only suppress expected errors (like missing lookups) in production. Best practice for the Excel IFERROR formula is to use it for expected errors, not to hide mistakes.
❌ The Problem:
✅ Solution:
=IFERROR(A1/B1, 0)Always provide the value_if_error parameter. Choose appropriate fallback: 0 for numeric calculations, "" (blank) for empty display, "-" or "N/A" for visible placeholders, or descriptive messages like "Error" or "Invalid data". The IFERROR function in Excel requires both arguments to work properly.
Master these IFERROR Function variants:
From basics to advanced - AI generates perfect formulas instantly.