VLOOKUP vs INDEX-MATCH vs XLOOKUP: Which to Use in Excel (With Examples)

Ian Klosowicz

VLOOKUP, INDEX-MATCH, and XLOOKUP all do the same core job: look up a value in one place and pull back a matching value from another. They differ in how flexible and how fragile they are. VLOOKUP is the simplest to write and the easiest to break, because it only looks to the right and depends on column positions. INDEX-MATCH looks in any direction and survives column changes, at the cost of being a two-function combo. XLOOKUP is the modern replacement that does everything INDEX-MATCH does in one clean function, as long as your version of Excel or Google Sheets has it. If you have XLOOKUP, use it. If you do not, use INDEX-MATCH. Use VLOOKUP when the sheet already uses it and it works.

That is the short answer. Below is how each one actually works, where VLOOKUP bites people, and how to decide which to reach for, with the version details that determine whether XLOOKUP is even an option for you.

Table of contents

The quick difference

All three match a lookup value and return a related value. What sets them apart is direction and durability.

  • VLOOKUP searches the leftmost column of a range and returns a column to its right, picked by a number you type in. Simple to write, fragile when columns move.
  • INDEX-MATCH uses MATCH to find the row and INDEX to return any column, in any direction. Sturdier, with slightly more to write.
  • XLOOKUP takes a lookup column and a return column directly, looks either direction, and has built-in handling for not-found results. Cleanest of the three, available only in newer versions.

If none of the columns in your sheet ever move and you always look rightward, all three give the same answer. The differences show up the moment a sheet grows, someone inserts a column, or you need to look to the left.

How VLOOKUP works and where it breaks

VLOOKUP looks for a value in the first column of a table and returns a value from a column you specify by its position number. You give it the lookup value, the table range, the column number to return, and whether you want an exact or approximate match.

It's the function most analysts learn first, and for a quick lookup on a stable sheet it's fine. The trouble is three built-in weak spots:

  • It only looks right. The lookup column has to be the leftmost column in your range. If the value you want to return sits to the left of your lookup key, VLOOKUP can't do it without rearranging the data.
  • The return column is a hardcoded number. You tell it to return column 4. Insert a new column anywhere in the middle and column 4 is now something else, so the formula silently returns the wrong field. Nothing errors.
  • The last argument is easy to get wrong. Leave off the match type and many versions default to approximate match, which returns the closest value instead of the exact one. On unsorted data that gives quietly wrong results.

That second one is the one that actually bites. A VLOOKUP that was correct on Monday returns the wrong column on Tuesday because someone added a field, and the number it returns still looks like a plausible value. This is the single most common lookup bug I see.

How INDEX-MATCH works and why it is sturdier

INDEX-MATCH splits the job in two. MATCH finds the position of your lookup value in a column, and INDEX returns the value at that position from any column you point it at. You nest them: MATCH locates the row, INDEX pulls the result.

Breaking it apart is exactly what makes it sturdier than VLOOKUP:

  • It looks in any direction. The lookup column and the return column are independent, so you can return a value to the left of your key. VLOOKUP can't.
  • It survives inserted columns. You reference the return column directly, not by a count from the left, so adding a column in the middle doesn't break the formula. The reference still points at the right data.
  • It can be faster on wide sheets, because it only reads the two columns you name rather than the whole block between the key and the return column.

The cost is that it reads as two functions wrapped together, which feels more complicated at first. Once it clicks, it's no harder, only less familiar. For years it was the answer to VLOOKUP's weaknesses, and it is still the right tool anywhere XLOOKUP is not available.

How XLOOKUP works and why it is the default now

XLOOKUP does what INDEX-MATCH does, in one function that reads cleanly. You give it the lookup value, the column to search, and the column to return. That is the whole thing for most uses.

It folds in the fixes INDEX-MATCH gave you, plus a few more:

  • It looks any direction by default, because you hand it the search column and the return column separately.
  • It survives inserted columns, for the same reason, since you reference columns directly.
  • It defaults to an exact match, which removes the approximate-match trap that catches people with VLOOKUP.
  • It has a built-in not-found argument, so you can return a clean message or a blank instead of wrapping the whole thing in IFERROR.

The one catch is availability. XLOOKUP exists in Excel for Microsoft 365, Excel 2021 and later, Excel for the web, and Google Sheets. It doesn't exist in Excel 2019 or earlier. So on a personal machine with a current version you are set, but on an older corporate install you may open a sheet and find XLOOKUP unavailable, which is the main reason INDEX-MATCH is still worth knowing.

Which one should you use

Use XLOOKUP if you have it, INDEX-MATCH if you do not, and VLOOKUP mostly when you are working in a sheet that already uses it. Here is the decision in order:

  1. Does your version have XLOOKUP? If yes, use it. It is the cleanest to write and read, and it avoids the common traps by default.
  2. No XLOOKUP? Use INDEX-MATCH. It gives you the direction freedom and the column-insert safety that VLOOKUP lacks, in every version of Excel.
  3. Working in someone else's VLOOKUP-heavy sheet? Keep using VLOOKUP there for consistency, unless it is causing bugs, in which case switch the problem formulas to one of the other two.

My first data job was in marketing analytics, and I lived in Google Sheets and BigQuery. Lookups were a daily thing, and the pattern that saved me the most pain was moving off VLOOKUP's hardcoded column numbers. Whichever of the two sturdier options your tools support, that switch is the upgrade that matters. If you want structured practice on the spreadsheet and SQL skills entry-level analysts actually use, that is the kind of thing built into the daily tasks inside Analyst Hive.

Common mistakes with lookups

Most lookup errors are not about choosing the wrong function. They are small slips that return a wrong value without any error. These are the ones I see constantly from people learning this.

  • Forgetting the exact-match argument in VLOOKUP. Leave it off and you can get approximate match, which returns the nearest value on unsorted data. Always set it to exact unless you specifically want a range lookup.
  • Hardcoding the column number. A VLOOKUP returning column 5 breaks the moment a column is inserted. This is the strongest reason to move to INDEX-MATCH or XLOOKUP, which reference columns directly.
  • Lookup value and lookup column not matching types. A number stored as text won't match a real number, so the lookup returns not-found even though the values look identical on screen. Check for stray text formatting.
  • Not handling the not-found case. A lookup with no match returns an error that then spreads to any cell referencing it. Wrap VLOOKUP and INDEX-MATCH in IFERROR, or use XLOOKUP's built-in not-found argument.
  • Lookup ranges that do not line up. In INDEX-MATCH and XLOOKUP, the search column and return column have to cover the same rows. If one is 100 rows and the other is 120, the result shifts.

Get the match type right, stop hardcoding column numbers, and handle the not-found case, and you avoid almost every lookup bug regardless of which function you picked.

FAQ

Is XLOOKUP better than VLOOKUP?

For most uses, yes. XLOOKUP looks in any direction, survives inserted columns, defaults to an exact match, and handles the not-found case on its own. VLOOKUP only looks right, breaks when columns move, and can silently do an approximate match. The one advantage VLOOKUP keeps is that it exists in every version of Excel, while XLOOKUP needs a newer one.

Should I still learn INDEX-MATCH if XLOOKUP exists?

Yes. Plenty of workplaces run older Excel versions without XLOOKUP, and you will open sheets full of INDEX-MATCH that you need to read and edit. It is also still a strong tool in its own right. Think of XLOOKUP as your first choice and INDEX-MATCH as the reliable fallback that works everywhere.

Why does my VLOOKUP return the wrong value after someone edited the sheet?

Almost always because a column was inserted. VLOOKUP returns a column by its position number, so if you told it to return column 4 and someone adds a column before it, column 4 now points at different data. The formula keeps running and returns a wrong but plausible value. INDEX-MATCH and XLOOKUP avoid this by referencing columns directly.

Can VLOOKUP look to the left?

No. VLOOKUP searches the leftmost column of its range and can only return columns to the right of it. If the value you want sits to the left of your lookup key, you'll need INDEX-MATCH or XLOOKUP, both of which let the search column and return column sit anywhere relative to each other.

Which lookup is fastest on a large spreadsheet?

INDEX-MATCH and XLOOKUP tend to be faster than VLOOKUP on wide sheets, because they read only the specific columns you name rather than the whole block from the key to the return column. On very large files, also make sure your match is exact, since approximate-match behavior on unsorted data causes both wrong results and slower recalculation.

Does Google Sheets have XLOOKUP?

Yes. Google Sheets supports XLOOKUP, along with VLOOKUP and INDEX-MATCH. If you work across both Excel and Sheets, the lookup logic carries over, though it is still worth confirming the exact Excel version on any work machine, since older Excel installs are where XLOOKUP goes missing.

Where to go from here

The choice comes down to what your tools support: XLOOKUP when you have it, INDEX-MATCH when you do not, and VLOOKUP when the sheet already runs on it. All three do the same job, and knowing why the newer ones are sturdier is what keeps your lookups from breaking when a sheet changes under you. Lookups are a daily part of real analyst work, so they are worth getting automatic. If you want to practice these alongside the SQL and spreadsheet skills that get people hired, that is what Analyst Hive is built for: a 90-day daily-task program for aspiring data analysts.