Lookup formula page

XLOOKUP Not Found Formula

Use the if-not-found argument when dashboards should show a clean fallback instead of #N/A.

Best for

Add a not-found fallback to XLOOKUP.

What it returns

If F2 does not exist in A2:A100, the formula returns Check SKU.

Copy formulas

Excel formula
=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)
Google Sheets formula
=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)
Excel / Google Sheets difference

Excel and Google Sheets use the same formula syntax for this pattern.

Example data

SKUItemCategoryPriceStock
A-100KeyboardHardware4918
A-101MouseHardware2532
B-200Desk MatOffice189
B-201NotebookOffice764

Formula explanation

  • The fourth XLOOKUP argument is the fallback result.
  • Exact match keeps IDs safe.
  • Use a short message that tells the user what to check.

What this formula does

XLOOKUP Not Found Formula is built around XLOOKUP. The example formula on this page is =XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0), and it is written against sample columns such as SKU, Item, Category, Price, Stock.

Excel and Google Sheets use the same copy pattern here, so the main work is adjusting ranges, criteria, and output cells to match your sheet.

For lookup work, the lookup key must identify the intended row before the return range is read. Check the key column, return column, and match mode before copying the formula into a production workbook.

Use this pattern for this task: Add a not-found fallback to XLOOKUP. If duplicate keys exist, decide whether the first matching row is acceptable or whether you need a multiple-criteria lookup instead.

Syntax pieceRole in the formula
XLOOKUPThe fourth XLOOKUP argument is the fallback result.
MATCHExact match keeps IDs safe.
Part 3Use a short message that tells the user what to check.

Practical use cases

Excel copy output
=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)

Excel: Use this in a product, price, or customer reference table where SKU identifies the row and Stock is the value you need to return. Returns: If F2 does not exist in A2:A100, the formula returns Check SKU.

Google Sheets copy output
=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)

Google Sheets: Use this in a workbook where an input cell drives a report and the formula must return one aligned value without manually filtering the source table. Returns: If F2 does not exist in A2:A100, the formula returns Check SKU.

Common errors

  • Lookup and return ranges must line up row by row.
  • Use exact match for IDs, SKUs, emails, and names unless the lookup table is intentionally sorted for approximate match.
  • Blank or duplicate lookup keys can make a correct formula return an unexpected row.

Common errors and troubleshooting

IssueLikely causeFix
Copied formula gives an unexpected resultLookup and return ranges must line up row by row.Confirm the lookup value exists, use exact match for IDs, and make sure the lookup and return ranges line up row by row.
Common setup problemUse exact match for IDs, SKUs, emails, and names unless the lookup table is intentionally sorted for approximate match.Confirm the lookup value exists, use exact match for IDs, and make sure the lookup and return ranges line up row by row.
Common setup problemBlank or duplicate lookup keys can make a correct formula return an unexpected row.Confirm the lookup value exists, use exact match for IDs, and make sure the lookup and return ranges line up row by row.
#N/A or not-found resultThe lookup key is missing, has a hidden space, or does not match the key column's data type.Trim the key values, verify the lookup range, and use an explicit fallback message when the formula supports one.
Wrong matching rowThe lookup table contains duplicate keys or approximate match is being used on unsorted data.Switch to exact match for IDs, or use a multiple-criteria lookup when one key is not unique enough.

When not to use this formula

  • Do not use a lookup formula to summarize many rows; use SUMIFS, COUNTIFS, FILTER, or QUERY instead.
  • Do not use approximate lookup for unsorted product, customer, or task lists.

Alternatives

AlternativeWhen to use it
XLOOKUP Formula BuilderBest modern lookup builder with not-found handling.
INDEX MATCH Formula BuilderUse when you need broad compatibility or left lookups.
VLOOKUP Formula BuilderUse for older workbooks where the lookup column is first.

Compare with related formulas

Formula or toolHow it differsUse it instead when
XLOOKUP Formula BuilderXLOOKUP Formula Builder solves a nearby workflow, while XLOOKUP Not Found Formula is focused on add a not-found fallback to xlookup.Best modern lookup builder with not-found handling.
INDEX MATCH Formula BuilderINDEX MATCH Formula Builder solves a nearby workflow, while XLOOKUP Not Found Formula is focused on add a not-found fallback to xlookup.Use when you need broad compatibility or left lookups.
VLOOKUP Formula BuilderVLOOKUP Formula Builder solves a nearby workflow, while XLOOKUP Not Found Formula is focused on add a not-found fallback to xlookup.Use for older workbooks where the lookup column is first.

Test cases

TestPlatformFormulaReturns
Excel copy outputExcel=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)If F2 does not exist in A2:A100, the formula returns Check SKU.
Google Sheets copy outputGoogle Sheets=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)If F2 does not exist in A2:A100, the formula returns Check SKU.

Related formulas

FAQ

What does the XLOOKUP Not Found Formula do?

It supports this task: Add a not-found fallback to XLOOKUP. The example uses F2, but you should replace the ranges and criteria with the cells in your own workbook.

Does the XLOOKUP Not Found Formula work in Excel and Google Sheets?

Yes. The Excel and Google Sheets versions on this page use the same syntax for this pattern.

What should I change before copying the formula?

Change the source ranges, criteria cells, and output range references so they match your sheet. Keep related ranges on the same rows unless the formula notes say otherwise.

Why does my lookup formula return #N/A?

The key may not exist, may contain a hidden space, or may be stored as text while the lookup table stores numbers. Check the key column before changing the formula.

Can this lookup return more than one matching row?

Lookup formulas normally return one aligned result. Use FILTER or QUERY if you need all matching rows.

Should I use exact match or approximate match?

Use exact match for IDs, names, SKUs, emails, and unsorted lists. Approximate match is only safe for sorted breakpoints such as tiers or rates.