Replace VLOOKUP Completely with XLOOKUP and XMATCH! (Exact Match, Approximate Match, Wildcards, and Multiple Criteria in 1 Minute)

Replace VLOOKUP Completely with XLOOKUP and XMATCH! (Exact Match, Approximate Match, Wildcards, and Multiple Criteria in 1 Minute)

Replace VLOOKUP Completely with XLOOKUP and XMATCH! (Exact Match, Approximate Match, Wildcards, and Multiple Criteria in 1 Minute)

This article was reproduced and verified by an editor in Excel 365, with AI tools used only as an aid for organizing the draft.

Syntax and Key Options

FunctionSyntaxKey Point
XLOOKUP=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])Can look left, right, up, or down; exact match by default
XMATCH=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])Returns a position (index); works well with SORTBY and INDEX

match_mode: 0 = exact (default), -1 = exact match or next smaller item, 1 = exact match or next larger item, 2 = wildcard. search_mode: 1 = first to last, -1 = last to first, 2/-2 = binary search (sorting required).

Exact Match and Wildcards

Find a price by SKU (return “Not registered” if missing)

=XLOOKUP(G2, SKU, Price, "Not registered")

Unit price for the first product name containing “pro”

=XLOOKUP("*pro*", Product, UnitPrice, "None", 2)   // 2=wildcard

Search from last to first (prioritize the latest item)

=XLOOKUP(G2, OrderID, Status, "None", 0, -1)

Approximate Matches (Next Larger and Next Smaller)

Ideal for rate tables and discount tables. Sort the table in the appropriate direction.

Discount rate for the tier at or below the purchase amount

=XLOOKUP(Amount, Threshold, Rate, , -1)   // next smaller

Grade at or above the score (cutoff table)

=XLOOKUP(Score, Cutline, Grade, , 1)     // next larger

Multiple-Criteria and 2D Lookups

Multiple criteria: Region + Product → Price

=XLOOKUP(1, (Region=G2)*(Product=H2), Price, "None")

2D intersection lookup with XMATCH (row + column)

=INDEX(Data, XMATCH(G2, RowKey), XMATCH(H2, ColKey))

Return Ranges and Multiple Columns at Once

Spill multiple fields with one lookup

=XLOOKUP(G2, SKU, HSTACK(Price, Stock, Supplier), "None")

Latest price by date (search from last to first)

=XLOOKUP(1, (SKU=G2)*(Date<=H2), Price, "None", 0, -1)

12 Practical Patterns

① Return a default price for a missing code

=XLOOKUP(Code, SKUs, Price, DefaultPrice)

② Multilingual names (Korean → English)

=XLOOKUP(KoName, KoList, EnList, KoName)

③ Customer’s latest order status

=XLOOKUP(1,(Cust=G2), Status,"None",0,-1)

④ Category → color (mapping table)

=XLOOKUP(Category, Map!A:A, Map!B:B, "gray")

⑤ First match among multiple partial matches

=XLOOKUP("*"&G2&"*", Product, Price, "None", 2)

⑥ Approximate-match rate plus calculation

=LET(r, XLOOKUP(Amount, Step, Rate,, -1), Amount*r)

⑦ 2D: Monthly sales by region

=INDEX(SalesTbl, XMATCH(Region, SalesTbl[지역]), XMATCH(Month, SalesMonths))

⑧ Dynamic data validation list: unique category values

=UNIQUE(XLOOKUP("*",Category,Category))

⑨ Multiple criteria without a combined key (Date + SKU)

=XLOOKUP(1,(SKU=G2)*(Date=H2), Price, "None")

⑩ Suppliers for low-stock items

=FILTER(HSTACK(SKU,Supplier), XLOOKUP(SKU, SKU, Stock)<MinStock)

⑪ Convert a VLOOKUP formula

// =VLOOKUP(key, table, 3, FALSE)
=XLOOKUP(key, table[1열], table[3열])

⑫ Custom message without IFERROR

=XLOOKUP(key, keyRange, valRange, "No data")

Common Mistakes and Checks

  • Missing sorting for approximate matches → Sort data appropriately for -1 and 1 in ascending order (lower-bound/upper-bound table).
  • Multiple-criteria parentheses → Put the complete expression (condition1)*(condition2) in the second argument.
  • Return range size → The return array (HSTACK/CHOOSECOLS) must have the same number of rows.
  • Numbers stored as text → Normalize with NUMBERVALUE before looking up values.

Summary

GoalExample Formula
Exact matchXLOOKUP(key, keyRange, valRange, "None")
WildcardXLOOKUP("*"&key&"*", range, val,, 2)
Approximate matchXLOOKUP(x, threshold, value,, -1/1)
Multiple criteriaXLOOKUP(1, (A=…)*(B=…), value)
2D lookupINDEX(table, XMATCH(rowKey), XMATCH(columnKey))
Try replacing VLOOKUP one formula at a time in your existing reports with XLOOKUP. Its ability to look left, specify an error message, and spill multiple columns makes formulas and maintenance much simpler.

Leave a Reply

Your email address will not be published. Required fields are marked *