Modern Relational Lookups: XLOOKUP & XMATCH Masterclass
Overview & Learning Objectives
XLOOKUP is Microsoft's modern replacement for VLOOKUP, HLOOKUP, and LOOKUP. It defaults to exact match, searches in any direction, replaces IFNA with a built-in not-found fallback, and never breaks when columns are inserted.
- Master the 6 parameters of XLOOKUP (3 mandatory, 3 optional).
- Perform leftward lookups without INDEX & MATCH.
- Use built-in [if_not_found] to eliminate ugly `#N/A` errors.
- Deploy XMATCH for modern relative position lookups.
Industry Standard
Standard: Modern enterprise data teams have phased out legacy VLOOKUP in favor of XLOOKUP across all new financial models and production reporting workbooks.
Real-World Example: Flipkart Vendor Catalog & SKU Reconciliation
At Flipkart Seller Hub, catalog managers cross-reference SKU IDs to fetch Vendor Name (placed to the LEFT) and Wholesale Cost (placed to the RIGHT). A single XLOOKUP retrieves both directions cleanly.
| Vendor Name (Left) | SKU Code (Search) | Product Title | Wholesale Price (Right) |
|---|---|---|---|
| Alpha Traders | SKU-7701 | Bluetooth Headphones | 1,450 |
| Zephyr Retail | SKU-7702 | Smart Watch Fit 2 | 2,800 |
| Om Infotech | SKU-7703 | USB-C Fast Cable | 220 |
Functions Covered in this Chapter
Here is the definition, exact syntax, parameter breakdown, and real-world business example for each function covered in this chapter:
XLOOKUP Function
Definition: Searches a range or array for a match and returns the corresponding item from a second range or array. Defaults to exact match and can search right-to-left.
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
lookup_value: The value to search for (e.g. "SKU-7701").lookup_array: The column or row being searched (B2:B4).return_array: The column or row to return values from (A2:A4 for left, D2:D4 for right).[if_not_found]: Clean fallback text if no match exists (e.g. "SKU Not Found").[match_mode]: 0=Exact match (default), -1=Exact or next smaller, 1=Exact or next larger, 2=Wildcard match.[search_mode]: 1=Search first-to-last (default), -1=Search last-to-first (reverse search).
=XLOOKUP("SKU-7702", B2:B4, A2:A4, "Not Found")XMATCH Function
Definition: The modern successor to MATCH. Returns the relative position of an item in an array, defaulting to exact match and supporting reverse order searches.
=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])
lookup_value: The search target.lookup_array: The 1D range to scan.[match_mode]: 0 for exact match (default).[search_mode]: 1 for first-to-last, -1 for last-to-first.
=XMATCH("SKU-7703", B2:B4)Common Mistakes & Limitations
- Using XLOOKUP in workbooks that must be opened by clients running Excel 2016 or earlier (XLOOKUP is only supported in Excel 2021, Excel 365, and Excel for Web).
- Selecting ranges of different lengths for `lookup_array` and `return_array`, causing `#VALUE!` error.
Keyboard Shortcuts
| Action | Windows | Mac |
|---|---|---|
| Insert Function Assistant | Shift + F3 | Shift + F3 |
| Select Contiguous Column Range | Ctrl + Shift + Down Arrow | Cmd + Shift + Down Arrow |
Pro Tips & Modern Alternatives
- XLOOKUP can return multiple columns at once: `=XLOOKUP("SKU-7701", B2:B4, C2:D4)` spills both Title and Price simultaneously!
- Use `INDEX & MATCH` if backward compatibility with legacy Excel 2013/2016 is required.