What Is IFERROR in Excel?
IFERROR is an Excel function that returns a value you choose when a formula would otherwise produce an error, and returns the formula's normal result when it does not. The syntax is =IFERROR(value, value_if_error), for example =IFERROR(A1/B1, 0). It is the standard way to keep models clean of #DIV/0! and #N/A.
IFERROR Syntax and Behavior
IFERROR takes two arguments: the formula to try, and the value to return if that formula errors. So =IFERROR(VLOOKUP(x, table, 2, 0), "Not found") returns the lookup result normally, but returns Not found if the lookup throws #N/A. It catches all Excel error types, including #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM!, #NULL!, and #N/A.
It was introduced in Excel 2007 as a cleaner replacement for the old =IF(ISERROR(...), ..., ...) pattern, which forced you to write the inner formula twice.
- Syntax:
=IFERROR(value, value_if_error). - Catches every Excel error type, not just one.
- Replaced the verbose
IF(ISERROR(...))pattern from Excel 2007 on.
When to Use IFERROR in Models
IFERROR is most useful where an error is expected and harmless. A division that may hit a zero denominator, a lookup that may miss, or a ratio early in a forecast that has no prior period are all good candidates for returning 0 or a blank instead of a red error.
In presentation-ready models, wrapping these formulas keeps the output clean so a reader does not see #DIV/0! scattered across a schedule.
- Divisions that may have a zero denominator.
- Lookups that may legitimately not find a match.
- Ratios in the first period of a forecast with no prior value.
The Risk of Overusing IFERROR
IFERROR hides every error, including the ones you did not expect. If you wrap a whole formula and it later breaks because of a #REF! from a deleted column or a #NAME? from a typo, the model will quietly show your fallback value instead of surfacing the problem. That can turn a visible error into a silent wrong number.
The safer habit is to wrap only the part of a formula that can legitimately error, and to keep the fallback value honest, often 0 or blank rather than a number that could be mistaken for a real result.
- It masks unexpected errors like
#REF!and#NAME?. - A silent wrong number is worse than a visible error.
- Wrap the narrow risky part, not the entire formula, where you can.
Wrapping Formulas With ModelMint
ModelMint's Error Wrap adds IFERROR around your selected formulas in one action, so you can clean up a schedule without retyping each formula by hand. It saves the tedious work of editing dozens of cells when you want a consistent error fallback across a range.
It runs locally on Windows in Excel 2016 and later, so wrapping happens instantly on your own machine with no telemetry.
Error Wrap
Wrap selected formulas in IFERROR in one action instead of editing each cell.
FAQ
What is the difference between IFERROR and IFNA?
IFERROR catches every error type, while IFNA catches only #N/A. IFNA is safer for lookups because it lets genuine errors like #REF! still show instead of hiding them behind a fallback value.
What does =IFERROR(A1/B1, 0) do?
It returns A1 divided by B1 normally, but returns 0 if that division errors, such as when B1 is empty or zero and the result would be #DIV/0!.
Is it bad to use IFERROR everywhere?
Yes, because it hides unexpected errors too. A broken reference or typo will show your fallback value instead of flagging the problem, turning a visible error into a silent wrong number.