If you work with spreadsheets, you will sooner or later need to pull a value from one table into another. You might need a price for a product code, a salary for an employee ID or a grade for a student roll number. Excel gives you three main ways to do this: VLOOKUP, INDEX-MATCH and the newer XLOOKUP. Each one works, but they behave very differently once your data gets messy.
Thank you for reading this post, don't forget to subscribe!This guide sets out XLOOKUP vs VLOOKUP vs INDEX-MATCH in plain English. You will see how each formula is built, where it breaks, and which one to use today. Every example uses the same small sample table, so you can copy the formulas straight into your own workbook and test them.

The Sample Data Used in This Guide
Imagine a small product list on a sheet. Column A holds the Product ID, column B the Product Name, column C the Category and column D the Price. The data runs from row 2 to row 100. In cell G2 you type the Product ID you want to look up, and you want the price to appear in H2.
- A2:A100 = Product ID (for example P-101, P-102, P-103)
- B2:B100 = Product Name
- C2:C100 = Category
- D2:D100 = Price
- G2 = the ID you are searching for
VLOOKUP: The Classic Lookup Formula
VLOOKUP (vertical lookup) has been in Excel for decades, and it is still the formula most people learn first. It searches down the first column of a range and returns a value from a column you specify by number.
VLOOKUP syntax
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Copy-paste example
=VLOOKUP(G2, A2:D100, 4, FALSE)
This says: find the value in G2 inside the first column of A2:D100, then return whatever is in the 4th column (Price) of the same row. The FALSE at the end asks for an exact match. Forgetting it is one of the most common VLOOKUP mistakes, because by default VLOOKUP does an approximate match and can quietly return the wrong row.
Where VLOOKUP falls short
- It only looks right. The lookup column must be the leftmost column of the range. If the ID sits in column D and the name in column B, VLOOKUP cannot do it.
- Hard-coded column numbers. If someone inserts a new column inside the table, the number 4 may now point at the wrong data.
- Approximate match by default. Leaving out the last argument can produce silent errors.
- Ugly errors. A missing value returns #N/A unless you wrap the formula in IFERROR or IFNA.
INDEX-MATCH: The Flexible Power-User Combo
For many years, experienced analysts avoided VLOOKUP and combined two functions instead. MATCH finds the position of a value in a list, and INDEX returns the item at that position from another list. Together, they make a lookup that can go in any direction.
INDEX-MATCH syntax
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))
Copy-paste example
=INDEX(D2:D100, MATCH(G2, A2:A100, 0))
MATCH looks for G2 in A2:A100 and returns its row position, say 7. INDEX then returns the 7th value from D2:D100. The 0 in MATCH means exact match.
Left lookup with INDEX-MATCH
Want to find the Product ID when you only know the product name typed in G3? VLOOKUP cannot look left, but INDEX-MATCH can:
=INDEX(A2:A100, MATCH(G3, B2:B100, 0))
Two-way lookup (row and column)
INDEX-MATCH really shines in a grid. If G2 holds the Product ID and H1 holds a column header such as Price or Category, this formula finds the crossing point:
=INDEX(A2:D100, MATCH(G2, A2:A100, 0), MATCH(H1, A1:D1, 0))
The downside is readability. Beginners often find two nested functions confusing, and the formula gets long quickly.
XLOOKUP: The Modern Replacement
Microsoft introduced XLOOKUP to fix the long-standing weaknesses of VLOOKUP. According to the official Microsoft XLOOKUP documentation, it searches a range or array and returns the item matching the first match it finds, with a fallback value when nothing is found. It is available in Microsoft 365, Excel for the web and Excel 2021 or later, as listed on Microsoft’s What’s new in Excel 2021 page. Older perpetual versions such as Excel 2016 and 2019 do not include it.
XLOOKUP syntax
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
Copy-paste examples
Basic exact match (exact match is the default, so no extra argument is needed):
=XLOOKUP(G2, A2:A100, D2:D100)
Custom message when not found:
=XLOOKUP(G2, A2:A100, D2:D100, "Not found")
Left lookup (find the ID from a name), with no tricks needed:
=XLOOKUP(G3, B2:B100, A2:A100)
Return several columns at once. In Microsoft 365, this spills the name, category and price into three neighbouring cells:
=XLOOKUP(G2, A2:A100, B2:D100)
Find the last match (for example, the most recent entry for a repeated ID). Setting search_mode to -1 searches from bottom to top:
=XLOOKUP(G2, A2:A100, D2:D100, "Not found", 0, -1)
Approximate match for tax bands or grade tables. Match mode -1 returns the next smaller item if there is no exact match, and the table does not need to be sorted:
=XLOOKUP(G4, J2:J10, K2:K10, , -1)
Two-way lookup with a nested XLOOKUP:
=XLOOKUP(G2, A2:A100, XLOOKUP(H1, A1:D1, A2:D100))

XLOOKUP vs VLOOKUP vs INDEX-MATCH: Side-by-Side Comparison
| Feature | VLOOKUP | INDEX-MATCH | XLOOKUP |
|---|---|---|---|
| Default match type | Approximate | Set by you (0 = exact) | Exact |
| Look to the left | No | Yes | Yes |
| Safe when columns are inserted | No (column number) | Yes | Yes |
| Built-in not-found message | No (needs IFNA) | No (needs IFNA) | Yes |
| Search last to first | No | Not easily | Yes |
| Return multiple columns | No | With dynamic arrays | Yes |
| Works in Excel 2016/2019 | Yes | Yes | No |
| Easy for beginners | Yes | Harder | Yes |
Which Lookup Formula Should You Use?
- Use XLOOKUP if everyone who opens the file has Microsoft 365 or Excel 2021 or later. It is shorter, safer and easier to read.
- Use INDEX-MATCH when you share workbooks with people on older Excel versions, or you need complex two-way lookups that must work everywhere.
- Use VLOOKUP only for quick, simple jobs where the lookup column is already on the left, or when you are maintaining an old file. Always add FALSE as the last argument.
One compatibility warning: if you open a file that uses XLOOKUP in a version of Excel that does not support it, the cells may show a #NAME? error. If you are unsure what your colleagues use, INDEX-MATCH is the safest choice.
Common Lookup Errors and Quick Fixes
- #N/A: the value was not found. Check for extra spaces with TRIM, or numbers stored as text. With XLOOKUP, add an if_not_found message.
- #REF! in VLOOKUP: the column number is larger than the number of columns in the range.
- Wrong result: usually an approximate VLOOKUP on unsorted data. Add FALSE.
- #NAME?: the function name is misspelt, or XLOOKUP is not available in that Excel version.
- Ranges shift when copied: lock them with dollar signs, for example
$A$2:$A$100.
Lookups get much easier when your data is clean and stored as an Excel Table (Ctrl+T). Structured references such as Products[Price] grow automatically as you add rows, so your formulas never miss new data. If you also build reports for meetings, our guide to PowerPoint mastery with Slide Master and Morph shows how to present those results clearly. And if you want AI help writing or debugging formulas, see our list of free AI tools for students and researchers.
Practice Exercise
Build the sample table with ten products. Then write three formulas that return the price of P-105: one with VLOOKUP, one with INDEX-MATCH and one with XLOOKUP. Next, insert a new column between Category and Price. You will see the VLOOKUP result change or break, while the other two keep working. That simple test explains why most professionals have moved away from VLOOKUP.
Frequently Asked Questions
Is XLOOKUP better than VLOOKUP?
In most cases, yes. XLOOKUP defaults to an exact match, can look left, is not broken by inserted columns and has a built-in not-found option. Its only real drawback is that it does not work in Excel 2019 or earlier.
Is INDEX-MATCH still worth learning?
Yes. It works in every Excel version and in Google Sheets, and many existing business workbooks rely on it. Understanding it also helps you read and fix older files.
Does Google Sheets support XLOOKUP?
Yes. Google Sheets added an XLOOKUP function with very similar arguments, so the basic examples in this guide work there too.
Why does my VLOOKUP return the wrong value?
Most likely the last argument is missing or set to TRUE, so Excel performs an approximate match. Set it to FALSE for an exact match.
Summary
VLOOKUP is simple but fragile: it only looks right, relies on column numbers and defaults to an approximate match. INDEX-MATCH is flexible and works everywhere, at the cost of a longer formula. XLOOKUP combines the best of both, with a clean syntax, exact match by default, left lookups, error handling and reverse search, provided you have Microsoft 365 or Excel 2021 or later. Learn XLOOKUP for daily work, keep INDEX-MATCH for compatibility, and use VLOOKUP only when you must.


