XLOOKUP Approximate Match Returns the Wrong Tier

XLOOKUP match_mode 2 is wildcards, not VLOOKUP's approximate match. For a mid-tier amount, match_mode -1 returns the next rate down.

On this page

A shipping or commission table should return the rate for the next breakpoint down. For a spend of 250 on this list, exact-match XLOOKUP comes back none, and match_mode 2 does the same. The next rate down is 8%, and that is match_mode -1, not 2. Mode 2 is wildcards, not VLOOKUP’s approximate match.

This page is a wrong bracket, not a missing-key cleanup and not a * / ? tutorial. For #N/A when the value is visible in the list, see XLOOKUP Returns #N/A Even Though the Value Exists: 7 Fixes. For wildcard patterns, see XLOOKUP Wildcard and Partial Match. These results were measured in Google Sheets. I did not re-run the match_mode cases in Excel.

Four match modes on the same mid-tier amount

Enter this rate table in A1:B5. Type the breakpoints as numbers. Store the rates as 0.05, 0.08, 0.12, and 0.15 (percent format is fine; the stored values are still those fractions).

Spend fromRate
05%
1008%
50012%
200015%

Put 250 in D2. That amount is past the 100 row and short of the 500 row, so the next rate down is 8%.

=XLOOKUP(D2,A2:A5,B2:B5,"none",0)
=XLOOKUP(D2,A2:A5,B2:B5,"none",2)
=XLOOKUP(D2,A2:A5,B2:B5,"none",-1)
=XLOOKUP(D2,A2:A5,B2:B5,"none",1)

The fifth argument is match_mode. The fourth argument is the value to return when nothing qualifies; I used the text none so a miss is visible. If you omit it, a miss is #N/A.

match_modeMeaningResult for 250
0 (also the default)Exact match onlynone, because 250 is not a breakpoint
2Wildcard matchnone. 250 has no * / ?, and this is not a tier lookup
-1Exact, or the next smaller item8% (the 100 row)
1Exact, or the next larger item12% (the 500 row)

If you need the next rate down, the mode is -1, not 2 and not the omitted default.

Exact, below the first, and above the last

The same four formulas, with only D2 changed:

D2What it is02-11
100exact breakpoint8%8%8%8%
250between 100 and 500nonenone8%12%
-10below the first breakpointnonenonenone5%
5000above the last breakpointnonenone15%none

The -10 and 5000 rows are the ones that surprise people who thought “approximate” always returns something. Mode -1 has nothing smaller than 0, and mode 1 has nothing larger than 2000.

The list does not have to be sorted for -1 and 1

On a copy of the table sorted descending (2000, 500, 100, 0), the four match_mode results for 250, 100, -10, and 5000 were the same as on the ascending list: -1 still returned 8% for 250, and 1 still returned 12%.

On a third copy, the rows were out of order: 0, 500, 100, 2000. For 250, -1 was still 8% and 1 was still 12%.

VLOOKUP(D2,A2:B5,2,TRUE) is a useful contrast only. For 250 it returned 8% on the ascending table, the same next-smaller rate as XLOOKUP -1. On the descending table it returned 5%, the first row’s rate, not 8%. On the out-of-order table it happened to return 8%. Approximate VLOOKUP is the subject of VLOOKUP Returning the Wrong Value? Fix Approximate Match First.

VLOOKUP(D2,A2:B5,2,FALSE) for 250 on the ascending table was #N/A: “Did not find value ‘250’ in VLOOKUP evaluation.” VLOOKUP has no next-larger mode and no if_not_found argument. That comparison sits in XLOOKUP vs INDEX MATCH vs VLOOKUP.

Binary search is a separate argument

search_mode 2 and -2 are binary search, and they are the sixth argument, not a substitute for match_mode. For 250 with match_mode -1 on the ascending table, search_mode 2 still returned 8%, but search_mode -2 returned none. On the out-of-order table, both binary modes returned 8% for the same lookup. I would not rely on binary search here; the default search plus match_mode -1 is the form that stayed with the next-smaller rate on every layout I ran.

One wildcard row, then stop

Mode 2 is for patterns, not tiers. With D2 set to the text 100*:

=XLOOKUP(D2,A2:A5,B2:B5,"none",2)
=XLOOKUP(D2,A2:A5,B2:B5,"none",-1)

Both returned none, and so did modes 0 and 1. The breakpoints are numbers; the text 100* is not the number 100. If the lookup itself contains * or ?, go to XLOOKUP Wildcard and Partial Match.

Sources

Oscar

Spreadsheet nerd who writes about Excel and Google Sheets formulas.

Google Sheets, 1 December 2026, new private unshared spreadsheet (locale en_US, 1000-row grid, America/New_York). Formulas were entered as user input through the Sheets API. Error text was read from the Sheets API error message. Rates were stored as 0.05, 0.08, 0.12, and 0.15. On the ascending table, XLOOKUP of 250 with if_not_found "none" returned none (match_mode 0), none (2), 0.08 (-1), and 0.12 (1). The same four modes for 100 all returned 0.08; for -10 they returned none, none, none, and 0.05; for 5000 they returned none, none, 0.15, and none. The same four mode results for 250, 100, -10, and 5000 were unchanged on a descending copy and on an out-of-order copy (0, 500, 100, 2000). VLOOKUP(...,TRUE) of 250 returned 0.08 on the ascending table, 0.05 on the descending table, and 0.08 on the out-of-order table. VLOOKUP(...,FALSE) of 250 on the ascending table returned #N/A, "Did not find value '250' in VLOOKUP evaluation." XLOOKUP of 250 with match_mode -1 and search_mode 2 returned 0.08 on both the ascending and the out-of-order tables; search_mode -2 returned none on the ascending table and 0.08 on the out-of-order table. The text 100* returned none in all four match_modes, including 2. Excel was not run.

Next in Lookup & Conditional Sums SUMIF Sums the Wrong Column: The Argument Order Is Not SUMIFS