Wrapping a formula in Excel's IF ISERROR combination lets you detect when a formula returns an error (such as #N/A, #DIV/0! or #VALUE!) and display something cleaner instead — like a blank cell, a zero, or a friendly message. The pattern is =IF(ISERROR(your_formula), value_if_error, your_formula), and it takes under a minute to set up once you know the syntax.

What You'll Need

  • Excel for Windows, Mac, or Excel for the web (the ISERROR function works in all of them)
  • A worksheet with a formula that is currently producing an error, or one you expect might
  • Basic familiarity with typing formulas into cells (formulas start with =)

Step-by-Step

  1. Click the cell containing the formula that is showing an error (for example, a VLOOKUP returning #N/A). Alternatively, click an empty cell where you want the protected version to live.
  2. Look at the existing formula in the formula bar and note it — you will reuse it. For example: =VLOOKUP(A2, $F$2:$G$50, 2, FALSE)
  3. Type the outer wrapper first: =IF(ISERROR(
  4. Paste or type the original formula (without its leading = sign) inside the ISERROR parentheses: =IF(ISERROR(VLOOKUP(A2, $F$2:$G$50, 2, FALSE)),
  5. Add the value to show when there is an error, followed by a comma. Use "" for a blank cell, 0 for a zero, or text in quotes like "Not found". Example so far: =IF(ISERROR(VLOOKUP(A2, $F$2:$G$50, 2, FALSE)), "Not found",
  6. Type the original formula one more time (again without the = sign) as the value to show when there is no error, then close the IF with a single parenthesis: =IF(ISERROR(VLOOKUP(A2, $F$2:$G$50, 2, FALSE)), "Not found", VLOOKUP(A2, $F$2:$G$50, 2, FALSE))
  7. Press Enter. If the lookup fails, the cell now shows "Not found" instead of #N/A; if it succeeds, it shows the normal result.
  8. To apply this to a whole column, click the cell, then drag the small square fill handle at the bottom-right corner of the cell down over the remaining rows. Relative references (A2, A3, A4...) will adjust automatically while absolute references ($F$2:$G$50) stay fixed.
  9. Test both paths: temporarily change the lookup value in A2 to something that does not exist, confirm you see your fallback text, then change it back and confirm the real result appears.

Common Mistakes

  • Forgetting to repeat the formula. IF needs three parts: the test, the error value, and the no-error value. Leaving off the third argument makes the cell show FALSE whenever there is no error.
  • Mismatched parentheses. ISERROR opens one set and IF opens another. Count them before pressing Enter — the formula should end with two closing parentheses, one for ISERROR and one for IF.
  • Typing = inside the formula. Only the very start of the cell gets an equals sign. Writing =IF(ISERROR(=VLOOKUP(...)) produces an error.
  • Using quotes for numbers. "0" is text; 0 is a number. If you plan to sum the column later, use the unquoted version.
  • Double-calculating expensive formulas. The classic IF ISERROR pattern evaluates the formula twice when it succeeds. On very large workbooks, consider IFERROR (see Tips) instead.

Tips

  • Use IFERROR for a shorter version. =IFERROR(VLOOKUP(A2, $F$2:$G$50, 2, FALSE), "Not found") does the same job with the formula written only once. It is available in Excel 2007 and later, including current Microsoft 365 versions.
  • Trap only specific errors when it matters. ISERROR catches every error type. If you want to catch only #N/A (common with lookups), use ISNA instead of ISERROR so genuine problems like #VALUE! still surface.
  • Return a blank rather than a space. Use "" for an empty-looking result; typing a space " " creates invisible text that can break COUNTA and other functions.
  • Don't blanket-hide errors across a whole sheet. Masking #DIV/0! or #REF! everywhere can bury real data problems. Use error handling where errors are expected, and investigate errors that shouldn't happen.

Troubleshooting

  • The formula returns FALSE. You likely omitted the third argument of IF. Add the original formula again after the second comma.
  • Excel says the formula has an error and won't accept it. Check parentheses balance and make sure every comma is a plain comma (not a semicolon — some regional settings use semicolons as argument separators; if so, replace the commas with semicolons).
  • The cell still shows an error. Confirm ISERROR wraps the full inner formula and that the cell you edited is the one actually displaying the error — sometimes the visible error comes from a different cell referenced downstream.
  • The result is text when you expected a number. Remove the quotation marks around the fallback value, and check whether the underlying lookup returned text formatted as a number.
  • Fill handle copied the formula but results look wrong. Verify absolute references ($) on any table range so it doesn't shift as you drag down.

Frequently Asked Questions

What is the difference between ISERROR and IFERROR?

ISERROR only returns TRUE or FALSE — it's a test, so it must sit inside IF to produce a custom result. IFERROR combines both steps in one function and only needs the formula written once, which is why it's usually the better choice in modern Excel.

Does ISERROR catch every Excel error type?

Yes. It returns TRUE for #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL!. If you only want to trap #N/A, use ISNA.

Can I use ISERROR with an empty cell result instead of text?

Yes. Use two double quotes with nothing between them: =IF(ISERROR(A1/B1), "", A1/B1). The cell will look empty, though it technically contains a formula returning a zero-length string.

Why does my IF ISERROR formula calculate slowly on big data?

The classic pattern runs the inner formula twice — once inside ISERROR and again as the success value. Switching to IFERROR halves the work because the formula is only evaluated once on success.

Does ISERROR work in Excel for the web and Mac?

Yes. ISERROR, IF, and IFERROR behave identically in Excel for Windows, Mac, the web, and Microsoft 365. Only the argument separator (comma vs. semicolon) may differ based on your regional settings.