Skip to main content

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 fourth XLOOKUP argument for a custom no-match result. The fallback can be fixed text, a blank, or a cell reference.

Example data

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

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

How the formula works

  • The fourth XLOOKUP argument is the fallback result.
  • Exact match keeps IDs safe.
  • Use a short message that tells the user what to check.
Syntax pieceRole in the formula
F2The key to search for.
A2:A100 and D2:D100The aligned lookup and return arrays.
"Check SKU"The fourth argument returned when the key is missing.
0The exact-match mode.

Verified examples

Missing SKU message
=XLOOKUP(F2, A2:A100, D2:D100, "Check SKU", 0)

Excel: Enter C-999 in F2. Returns: Check SKU

Found SKU price
=XLOOKUP(F2,A2:A100,D2:D100,"Check SKU",0)

Google Sheets: Enter B-201 in F2. Returns: 7

Cell-driven fallback
=XLOOKUP(F2,A2:A100,D2:D100,G2,0)

Excel: Enter C-999 in F2 and Ask inventory team in G2. Returns: Ask inventory team

Common errors and fixes

IssueLikely causeFix
A blank F2 shows the fallbackXLOOKUP treats an empty input as a key with no match.Add an input guard such as =IF(F2="","",XLOOKUP(...)) when blank input should stay blank.
XLOOKUP reports an array-size errorThe lookup and return arrays cover different row counts.Make both arrays start and end on the same rows.
The fallback hides a missing keyCustom text makes no-match output readable but does not identify why the key is absent.Validate the source list separately and choose fallback wording that fits the workflow.

When not to use this formula

  • Do not use a friendly fallback as a substitute for validating duplicate keys or incorrect source data.

Alternatives

AlternativeWhen to use it
XLOOKUP Exact Match FormulaUse when the standard Not found fallback is sufficient.
XLOOKUP Formula BuilderUse when lookup, return, and fallback cells need to be selected interactively.

Related formulas

Official references

FAQ

Which XLOOKUP argument controls the no-match output?

The fourth argument controls what is returned when the lookup key is not found.

How do I keep a blank input blank?

Wrap the lookup in an IF guard such as =IF(F2="","",XLOOKUP(...)).