FormulaCraft

IFERROR vs ISERROR: handling vs detecting errors in Excel and Sheets

Excel & Google Sheets
=IFERROR(VLOOKUP(A2,B2:C5,2,0),"Not found")

Verified example

Computed by a real spreadsheet engine on the sample data below.

KeyLookupValPrice
AppleApple1.20
BananaBanana0.50
CherryMango2.00
DurianOrange0.80

=IFERROR(VLOOKUP(A2,B2:C5,2,0),"Not found")1.2

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Put a lookup key in A2 and a lookup table in B2:C5 (lookup values in B, results in C).
  2. 2Wrap the VLOOKUP with IFERROR to return a fallback if the key is missing: =IFERROR(VLOOKUP(A2,B2:C5,2,0),"Not found"). If VLOOKUP finds a match, its result passes through; if it errors, "Not found" appears.
  3. 3Use ISERROR when you need to branch to completely different logic: =IF(ISERROR(VLOOKUP(A2,B2:C5,2,0)),"Missing","OK"). ISERROR returns TRUE for any error type (#N/A, #VALUE!, #REF!, etc.).
  4. 4To catch only #N/A (missing lookup), prefer IFNA over IFERROR — it leaves other error types visible so genuine formula mistakes are not silently hidden.
  5. 5For more granular detection, ISERR catches all errors except #N/A; use it when a #N/A is meaningful and should propagate, but other errors need handling.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What is the difference between ISERROR and ISERR?

ISERROR returns TRUE for all error types including #N/A. ISERR returns TRUE for all errors except #N/A. Use ISERR when a missing-lookup result is semantically different from a formula mistake.

Does IFERROR evaluate the formula twice?

In older Excel versions it could. Modern Excel and Google Sheets evaluate the expression only once, so there is no performance penalty for using IFERROR over IF(ISERROR(...)).

Can IFERROR be nested?

Yes, but deeply nested IFERROR calls become hard to read. If you need to try multiple fallback lookups, consider IFERROR(VLOOKUP(...),IFERROR(XLOOKUP(...),"Default")) or restructure with XLOOKUP's built-in if-not-found argument.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: