XLOOKUP IF Not Found

There are two ways to “xlookup if not found”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: XLOOKUP's fourth argument is a built-in "if not found" value — =XLOOKUP(E2,A:A,B:B,"Missing") returns "Missing" when the lookup value is absent, replacing the need to wrap in IFERROR.

On this page8

Formula: XLOOKUP with Error Fallback

=XLOOKUP(E2,A:A,B:B,"Missing")
Annotated stepsExcel
1

Confirm you are using Excel 365 or Excel 2021+ (XLOOKUP is not in Excel 2019 or earlier).

2

Identify: the lookup value (E2), lookup column (A:A), return column (B:B), and a fallback string.

3

Write: =XLOOKUP(E2, A:A, B:B, "Missing")

4

Press Enter. Unlike VLOOKUP, no column number is needed — just reference the return column directly.

5

To extend to a "missing value then try another table" chain: =XLOOKUP(E2,A:A,B:B,XLOOKUP(E2,D:D,E:E,"Not in either table")).

Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

What this does

XLOOKUP is the modern replacement for VLOOKUP and INDEX/MATCH in Excel 365 and 2021+. Its fourth argument, if_not_found, serves the same purpose as wrapping the entire formula in IFERROR: it provides a clean fallback when the lookup value is absent. =XLOOKUP(lookup_value, lookup_array, return_array, if_not_found) returns the value from return_array in the matching row — or if_not_found when no match exists. XLOOKUP also removes the VLOOKUP column-number limitation (the return column can be to the LEFT of the lookup column), supports exact and approximate matching, and can search from the last match instead of the first. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “xlookup if not found”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.

A worked example

Scenario: column A contains employee IDs, column B contains names. Cell E2 holds an ID to look up. =XLOOKUP(E2,A:A,B:B,"Missing") returns the matching name if the ID exists, or "Missing" if it does not. To return multiple columns: =XLOOKUP(E2,A:A,B:D,"Missing") returns all three columns B, C, D for the matching row in one formula (spills across cells in Excel 365). To search from the last match: =XLOOKUP(E2,A:A,B:B,"Missing",0,-1) adds 0 for exact match and -1 to search from bottom up. Migrate new formulas from VLOOKUP+IFERROR to XLOOKUP whenever the workbook targets Excel 365 or 2021+. The fourth-argument fallback makes the formula self-documenting — anyone reading =XLOOKUP(E2,A:A,B:B,"Not found") immediately sees the intent, the lookup columns, and the error handling in one compact expression. Reserve VLOOKUP+IFERROR for workbooks that must open in older Excel versions. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Some functions on this page are newer additions to Excel: they are in current Microsoft 365 and Excel for the web, while older perpetual Excel versions return #NAME?. Google Sheets maintains its own function list, so confirm each function exists there before relying on the same formula. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. The short version of “xlookup if not found”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.

Common mistakes

  • Using XLOOKUP in Excel 2019 or earlier — it is not available and will return #NAME?. Use IFERROR(VLOOKUP(…)) or IFERROR(INDEX(MATCH(…))) instead.
  • Forgetting the fourth argument when no-match handling is needed — without it, XLOOKUP returns #N/A just like VLOOKUP. Adding the fourth argument replaces IFERROR entirely.
  • Using the wrong match mode — the fifth argument defaults to exact match (0). For approximate/wildcard matching, set it to 1 (next larger), -1 (next smaller), or 2 (wildcard). Do not leave it out and hope for the right behavior.

Frequently asked questions

Is XLOOKUP better than VLOOKUP + IFERROR?

Yes, for Excel 365/2021+. XLOOKUP is more readable (no column number), supports return columns to the left, has a built-in fallback as the fourth argument, and handles multi-column returns. Keep VLOOKUP + IFERROR for backward compatibility with Excel 2019 and earlier.

Can XLOOKUP return multiple values at once?

Yes — =XLOOKUP(E2, A:A, B:D, "Missing") returns all three columns (B, C, D) for the matching row, spilling across adjacent cells. This is a key advantage over VLOOKUP, which returns one column at a time.

How do I chain two XLOOKUP calls (search a second table if not found in the first)?

=XLOOKUP(E2, A:A, B:B, XLOOKUP(E2, D:D, E:E, "Not found")) uses a nested XLOOKUP as the fallback. If E2 is not in column A, the outer XLOOKUP's fourth argument (another XLOOKUP on column D) runs instead.