VLOOKUP vs XLOOKUP vs INDEX MATCH: Which Lookup to Learn First

Learn XLOOKUP first if every person who opens your files has Excel 2021, Microsoft 365 or Google Sheets. It reads the way you would describe the task in plain English, and it handles the common errors for you. Learn INDEX MATCH second, because it works in every version and shows how a lookup actually finds and returns data. Learn VLOOKUP well enough to read and repair it, because you will inherit it in most workbooks you open, but avoid writing new work with it unless you have a specific reason.

What VLOOKUP does and where it stops

VLOOKUP takes four arguments:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

It searches the first column of the table array for the lookup value, then returns the value from the column number you specify, counted from the left of that table. The fourth argument controls matching. If you omit it, or set it to TRUE, VLOOKUP performs an approximate match. If you set it to FALSE, it performs an exact match.

That default causes most VLOOKUP errors. An approximate match on unsorted data returns a value that looks plausible and is wrong. Many people learn VLOOKUP without ever seeing FALSE used correctly, so they copy formulas that silently return the wrong row.

VLOOKUP has three structural limits:

  1. It can only look at the first column of the table. If your ID sits in column D and the name you need sits in column A, VLOOKUP cannot reach it.
  2. The column number is hard-coded. A formula that returns column 3 keeps returning column 3 even after someone inserts a new column in front of it.
  3. It returns #N/A when the value is missing and offers no built-in alternative message.

None of these problems is fatal on a small, stable sheet. They become serious when the sheet changes, which most business sheets do.

Binsight Inventory Spreadsheet

Skip the setup

Binsight Inventory Spreadsheet

Stock in, stock out and reorder alerts that turn red before you run out. Uses lookups and conditional formatting.

See it on Taskdale →

What XLOOKUP does and what it fixes

XLOOKUP takes up to six arguments, but the first three do most of the work:

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

The lookup array and return array are separate ranges, so you name exactly where to search and where to return from. The lookup column does not have to be the leftmost column, and the return column does not depend on a column count. Inserting columns does not break the formula, because the references move with the data.

The defaults are sensible. XLOOKUP performs an exact match unless you change match_mode. The optional if_not_found argument lets you specify a message or value to display when nothing matches, such as “Not listed” or 0, so you do not need to wrap the formula in another function.

The optional arguments add useful control:

  • match_mode can be 0 (exact, the default), -1 (exact or next smaller), 1 (exact or next larger) or 2 (wildcard match).
  • search_mode can be 1 (first to last, the default), -1 (last to first, which returns the last match when there are duplicates), or 2 and -2 (binary search on sorted data, faster on very large sorted ranges).

XLOOKUP is available in Excel 2021, Excel for Microsoft 365 and Google Sheets. It is not available in Excel 2016 or Excel 2019. This single fact determines most of the decision in this guide.

What INDEX MATCH does and why it still matters

INDEX MATCH is two functions working together, and each has a clear job.

MATCH finds the position of a value in a single row or column. INDEX returns the value at a given position in a range.

=INDEX(return_array, MATCH(lookup_value, lookup_array, 0))

The 0 at the end is the match type. It requests an exact match. Leave it out and MATCH defaults to 1, which is an approximate match on ascending data, and you get the same silent error that catches VLOOKUP users. Always write the 0.

INDEX MATCH has four practical strengths:

  • It works in every version of Excel and in Google Sheets.
  • It can look left, because the lookup array and return array are independent.
  • It survives column insertions, because both references move with the data.
  • It extends naturally to two-way lookups, where you match on both a row label and a column label.

The trade-off is typing and readability. INDEX MATCH needs two function names, two sets of brackets and careful attention to which range is which. Beginners find it harder to read at first. Once XLOOKUP is widely available, INDEX MATCH is best understood as the long-standing pattern you will meet in older files and in any workbook that must open on older versions.

Side-by-side comparison

AttributeVLOOKUPXLOOKUPINDEX MATCH
Available in Excel 2016 and 2019YesNoYes
Available in Excel 2021 and Microsoft 365YesYesYes
Available in Google SheetsYesYesYes
Default match typeApproximate (unless FALSE is entered)ExactApproximate in MATCH (unless 0 is entered)
Can search to the left of the key columnNoYesYes
Breaks when a column is insertedYes, if the column number is hard-codedNoNo
Built-in “not found” outputNoYes (if_not_found)No (needs IFNA or IFERROR)
Two-way lookupAwkwardPossible, usually nestedNative pattern
Typing effortLowestLowHighest
Readability for a new colleagueGood for simple casesBestModerate

The table shows that XLOOKUP wins on most attributes, but its single limitation is the one that matters most: availability. A formula that works perfectly on your machine returns #NAME? on a colleague’s machine if their version is older. That is why the decision starts with the people who use the file, not with the function.

Plumline Client Tracker (CRM)

Ready-made template

Plumline Client Tracker (CRM)

Every client, lead and follow-up in one sheet, with drop-downs and status colours already set up.

See it on Taskdale →

How to choose which lookup to learn

Work through these steps in order.

  1. List every person who opens, edits or receives the file, and check their Excel version (File, Account, About Excel) or confirm they use Google Sheets.
  2. If everyone is on Excel 2021, Microsoft 365 or Google Sheets, learn XLOOKUP as your primary lookup and use it for all new work.
  3. If any user is on Excel 2016 or 2019, or you cannot confirm their version, learn INDEX MATCH as your primary lookup. Your formulas will work for everyone.
  4. If you inherit VLOOKUP formulas, learn to read them and check that every formula ends in FALSE. Convert a formula to XLOOKUP or INDEX MATCH only when you are already changing it, not as a separate exercise.
  5. Practise approximate matching separately. Band lookups, such as commission rates by sales value, are where VLOOKUP’s TRUE option is still used legitimately. XLOOKUP can do the same job with match_mode set to -1 or 1, and INDEX MATCH can do it with MATCH set to -1 or 1 on sorted data.

A practical rule follows from this. Learn the one you will use every day, then learn the one that your slowest-upgrading colleague can still open. VLOOKUP sits outside that rule. It is a legacy skill for reading old work.

Worked example: price and stock lookup on an order sheet

Suppose you keep two sheets. The Products sheet has columns A to D: Product ID, Product name, Unit price and Stock level, with data in rows 2 to 300. The Orders sheet has the Product ID in column B, and you need the unit price in column C and the stock level in column D.

Here are the formulas for the Orders sheet in row 2.

VLOOKUP (price):

=VLOOKUP(B2, Products!$A$2:$D$300, 3, FALSE)

The lookup value is the product ID in B2. The table runs from column A to column D, so the price is column 3 of that table. The FALSE forces an exact match.

XLOOKUP (price):

=XLOOKUP(B2, Products!$A$2:$A$300, Products!$C$2:$C$300, "Not listed")

The lookup array is the ID column and the return array is the price column. The final argument returns “Not listed” if the ID does not exist.

INDEX MATCH (price):

=INDEX(Products!$C$2:$C$300, MATCH(B2, Products!$A$2:$A$300, 0))

MATCH finds the row number of the product ID. INDEX returns the price from that row in the price column. The 0 requests an exact match.

Notice the dollar signs. They lock the ranges so that when you copy the formula down the Orders sheet, the references stay on the Products sheet and do not drift.

What happens when things change

Now suppose a colleague inserts a new column between A and B on the Products sheet, for a supplier code. The price has moved from column C to column D, and the stock has moved from column D to column E.

  • The VLOOKUP formula still points at column 3 of the range, which is now the supplier code. Its ranges expand to A to E, but the column count still returns the wrong field. It returns supplier codes as prices and gives no error. This is the most dangerous outcome, because the sheet looks correct.
  • The XLOOKUP formula still points at the price column, wherever it has moved. It returns the correct price.
  • The INDEX MATCH formula also still points at the correct price column, because the reference moved with the data.

Now suppose an order contains the ID P-9999, which is not in the Products sheet. VLOOKUP returns #N/A. XLOOKUP returns “Not listed”. INDEX MATCH returns #N/A unless you wrap it in IFNA, for example =IFNA(INDEX(...), "Not listed").

A two-way example

Sometimes the data is a grid: products down the side and months across the top. Suppose the Sales sheet has product IDs in column A (rows 2 to 50) and month headings in row 1 (columns B to M). To find the value for product ID in A2 and month in C1 on another sheet, INDEX MATCH works cleanly:

=INDEX(Sales!$B$2:$M$50, MATCH($A2, Sales!$A$2:$A$50, 0), MATCH(C$1, Sales!$B$1:$M$1, 0))

The first MATCH finds the row, the second finds the column, and INDEX returns the cell where they meet. XLOOKUP can achieve the same result by nesting one XLOOKUP inside another, which is possible but harder to read. VLOOKUP cannot do a two-way lookup without helper columns.

Common mistakes and how to fix them

Leaving out the match type

VLOOKUP without FALSE, and MATCH without 0, perform approximate matching. This returns plausible but incorrect results on unsorted data. Make it a habit to type the final argument every time. If you are unsure, add it.

Hiding errors with IFERROR

Wrapping a lookup in IFERROR makes the #N/A disappear, but it also hides broken ranges, misspelt references and wrong data types. Use the if_not_found argument in XLOOKUP, or IFNA in INDEX MATCH and VLOOKUP, so that only missing matches are caught. Any other error should stay visible.

Numbers stored as text

An ID that looks like 1042 can be stored as text on one sheet and as a number on the other. The lookup then returns #N/A even though the value is visibly present. Check a suspicious cell with =ISTEXT(A2) or =ISNUMBER(A2). Fix it by converting the column, or by using VALUE or TRIM where appropriate.

Trailing spaces

A product ID stored as “P-1042 ” with a trailing space will not match “P-1042”. The space is invisible, and so is the error. Use TRIM on imported data, and check with LEN if a match fails for no obvious reason.

Missing or drifting references

Copying a formula without locking the ranges causes the lookup array to shift, so the formula searches the wrong rows. Use dollar signs on ranges that should stay fixed, or convert the source data to an Excel table and use structured references such as Products[Unit price]. Structured references also make the formula readable, and they expand automatically when rows are added.

Duplicate keys

All three functions return only one match by default. If a product ID appears twice, you get the first row’s value, with no warning. Check for duplicates before building a lookup. With XLOOKUP, search_mode -1 returns the last match instead, but that is a choice you should make deliberately and document.

Wildcard characters in lookup text

The characters , ? and ~ are treated as wildcards in some lookup modes. A lookup for “Widget” can match “Widget Pro” and “Widget Mini”. XLOOKUP’s match_mode 2 uses wildcards deliberately, and VLOOKUP and MATCH with 0 also treat these characters as wildcards for text values. If your keys contain these characters, check for unexpected matches.

Case assumptions

All three functions ignore case. “abc” matches “ABC”. This is usually what you want, but it can merge two records that your business treats as separate.

Approximate matching on unsorted data

Binary search modes in XLOOKUP, and approximate matching in VLOOKUP and MATCH, assume sorted data. Unsorted data gives wrong answers without warning. Sort the lookup column ascending before you rely on approximate or binary modes, or use exact matching instead.

Checklist before you ship a lookup

Use this list each time you add or change a lookup formula.

  • The match type is set explicitly (FALSE, 0 or match_mode 0), unless you have a deliberate reason for approximate matching.
  • The lookup and return ranges are the same size and use absolute references where they should stay fixed.
  • A missing value produces a clear message, through if_not_found or IFNA, and not an IFERROR that hides every error.
  • The key column is free of duplicates, trailing spaces and text-formatted numbers.
  • Every person who opens the file is on a version that supports the function, or INDEX MATCH is used instead.
  • A test row with a known answer and a test row with a missing ID both return the expected result.
  • The formula has been tested after a column has been inserted into the source sheet.

If you follow the decision rule and this checklist, you will avoid the failures that cost teams the most time: silent wrong answers, broken files on older machines and formulas that nobody can explain six months later.

Paidmark Invoice and Estimate Kit

Get the finished file

Paidmark Invoice and Estimate Kit

Invoices, estimates, receipts and a payment tracker that flags what’s overdue, all in one Excel file.

See it on Taskdale →

Scroll to Top