No more #N/A when a lookup misses. XLOOKUP’s built-in fourth argument lets you return a friendly message or a default value when there’s no match — no IFERROR wrapper needed.
The example
A missing ID returns a message instead of an error.
| A | B | |
|---|---|---|
| 1 | Lookup | Result |
| 2 | ID 102 | Ann |
| 3 | ID 999 | Not found |
The formula
Default built right into the lookup:
How it works
XLOOKUP’s fourth argument handles the miss:
- The first three arguments are the usual lookup value, lookup array, and return array.
- The fourth — if_not_found — is returned when there’s no match: a message, a 0, or a blank
"". - This replaces the old
IFERROR(VLOOKUP(…), "…")pattern with one clean argument. - Unlike IFERROR, it only catches the “not found” case — real errors in the data still surface, which is usually what you want.
IFERROR still has a place. XLOOKUP’s default catches a missing lookup; if the returned cell itself contains an error, wrap with IFERROR too. For VLOOKUP (no built-in default), IFERROR(VLOOKUP(…), "Not found") remains the way.
Try it: interactive demo
Look up an ID (try a missing one).
Variations
Default to zero
Numeric default:
Blank if missing
Empty string:
VLOOKUP equivalent
Wrap with IFERROR:
Pitfalls & errors
365/2021 only. XLOOKUP isn’t in Excel 2019 or earlier; use the IFERROR+VLOOKUP form there.
Default vs error. The fourth argument only fires on “no match,” not on errors inside the data — add IFERROR if the return cell can error.
Don’t skip the comma. The default is the 4th positional argument — make sure it’s in the right slot.
Practice workbook
Frequently asked questions
How do I avoid #N/A with XLOOKUP?
How is this different from IFERROR?
What's the VLOOKUP equivalent?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class