Function Problems

Fix XLOOKUP Returning Zero Instead of a Matching Value in Excel

John WilsonJohn Wilson Nov 18, 2026 869 views

Question details

Find out why an Excel XLOOKUP formula returns zero instead of the expected matching value.

Fix XLOOKUP Returning Zero Instead of a Matching Value in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user is looking up a value in an Allocations worksheet and returning a value from another column.
Observed behavior
The formula returns zero where the user expects a nonzero matching value.
Before you start

Locate the lookup value, the expected matching row, and the return cell on the Allocations sheet. Check the existing formula's lookup range, return range, and optional not-found argument.

Solution 1Recommended

Test the Lookup and Check the Expected Return Cell

Use a separate formula to determine whether Excel finds a match and whether the source value is actually zero or blank.

An exact-match XLOOKUP normally returns #N/A when it finds no match unless the if_not_found argument specifies another result. A zero can also come from a matched cell that contains zero or is blank.

1
Run a separate lookup

In an empty cell, enter =XLOOKUP($A298,Allocations!$A:$A,Allocations!F:F,"Not found",0). The final 0 requests an exact match.

2
Compare the expected key

Replace A2 with the expected row and enter =A298=Allocations!A2 in an empty cell. FALSE means the two values do not compare as equal.

3
Inspect the return value

On the Allocations sheet, check column F in the matched row. A genuine zero is returned as zero, and a blank return cell can also appear as zero in XLOOKUP.

4
Check the original formula

Select the original formula and inspect its if_not_found argument in the formula bar. If it is set to 0, change it to a label such as "Not found" to distinguish a missing match from a returned zero.

Test the Lookup and Check the Expected Return Cell
Free Microsoft Office alternative

Review Spreadsheet Lookups with WPS Office

WPS Office is a free, lightweight alternative for working with spreadsheets in a familiar interface. Open existing Excel files to review data and formulas while moving between Office workflows; it does not repair Excel itself.

Inspect lookup keys and return values in WPS SpreadsheetsCompatible with Microsoft Excel XLSX and XLS filesFamiliar spreadsheet interface for an easier transitionFree and lightweight for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does XLOOKUP return zero for a blank cell?

When XLOOKUP finds a matching row but the return cell is blank, Excel can display the result as zero. Check the return cell directly to distinguish a blank from a genuine zero.

Should an unmatched XLOOKUP return zero?

Not by default. An unmatched XLOOKUP normally returns #N/A, but it returns zero if the formula's if_not_found argument is set to 0. Change that argument to "Not found" to make missing matches visible.

How can I tell whether two lookup values are the same?

Enter a comparison such as =A298=Allocations!A2, using the expected matching row. If the result is FALSE, compare LEN and TYPE results and look for spaces, hidden characters, or text-number differences.

Can lookup and return ranges start on different rows?

They should cover corresponding rows. For example, pair Allocations!$A$2:$A$1000 with Allocations!$F$2:$F$1000 so each lookup key aligns with its intended return value.