keepcalculator

06 Numbers and Powers

VLOOKUP Faster: Speed Up Excel Lookups

Card No. 06·49488 · Updated · Standard formula, shown below

If your VLOOKUP formulas feel slow, the fastest fix is usually to switch to INDEX/MATCH or XLOOKUP, which can be several times quicker on large datasets. This article explains why VLOOKUP lags, how to measure the difference, and the practical steps you can take to speed up your lookups today.

Why VLOOKUP Can Be Slow

VLOOKUP’s default behavior is approximate match (TRUE), which assumes your data is sorted and uses a binary search. That is fast, but it’s risky because it returns the nearest match, not necessarily the exact one. Most people use exact match (FALSE), which forces Excel to scan row by row from the top until it finds the lookup value. On a sheet with 100,000 rows, that means up to 100,000 comparisons per formula. If you have 10,000 formulas, that’s a billion operations—enough to make Excel feel like it’s frozen.

Additionally, VLOOKUP only looks to the right. If your lookup column is not the leftmost column of your table, you must rearrange your data or use a helper column, which adds complexity and can slow things down further.

How to Measure the Speed Difference

You can test the performance gap yourself with a simple experiment. Create a table with 50,000 rows in columns A and B. In column D, put 1,000 random lookup values. Then:

  1. In column E, enter =VLOOKUP(D1,$A$1:$B$50000,2,FALSE) and copy down.
  2. In column F, enter =INDEX($B$1:$B$50000,MATCH(D1,$A$1:$A$50000,0)) and copy down.
  3. Press Ctrl+Alt+F9 to force a full recalculation and time how long each column takes.

On most machines, the INDEX/MATCH column will recalc noticeably faster—often 2–5 times quicker. The gap widens as the dataset grows because INDEX/MATCH only scans the lookup column, not the entire table.

Why INDEX/MATCH Is Faster

INDEX/MATCH splits the job into two parts: MATCH finds the row number, and INDEX returns the value from that row. MATCH only looks at one column, so it scans less data. VLOOKUP, by contrast, has to check the entire table array for each formula, even if it only needs the lookup column and the return column. That extra scanning is the main reason VLOOKUP is slower.

Another subtle point: VLOOKUP with FALSE is a linear search. INDEX/MATCH also uses a linear search, but it’s a shorter one because it only goes down one column. If your lookup column is column A and your return column is column Z, VLOOKUP is checking 26 columns per row; INDEX/MATCH checks only one.

XLOOKUP: The Modern Alternative

If you’re on Excel 365 or Excel 2021, XLOOKUP is often the best choice. It’s designed to be faster than VLOOKUP and more flexible. XLOOKUP can look to the left or right, return multiple values, and handle missing values gracefully. Its syntax is simpler: =XLOOKUP(lookup_value, lookup_array, return_array). In many tests, XLOOKUP performs similarly to INDEX/MATCH, but it’s easier to write and maintain.

One caveat: XLOOKUP is not available in older Excel versions. If you share workbooks with people on Excel 2019 or earlier, stick with INDEX/MATCH.

Other Ways to Speed Up VLOOKUP

If you can’t switch to INDEX/MATCH or XLOOKUP, you can still improve VLOOKUP’s performance:

  • Use approximate match (TRUE) only if your data is sorted and you need the nearest match. This is the fastest mode because it uses a binary search.
  • Sort your data if you must use approximate match—but be aware that exact match (FALSE) ignores sorting.
  • Limit the table array to only the columns you need. Instead of $A:$Z, use $A:$B if you only need column B.
  • Use a helper column to combine multiple criteria into one lookup value, so you can use a single VLOOKUP instead of an array formula.
  • Convert your data to an Excel Table (Ctrl+T) and use structured references. This can help Excel manage the range more efficiently.
  • Avoid volatile functions like INDIRECT or OFFSET in your lookup formulas—they force recalculation every time anything changes.

Common Mistakes That Slow Down Lookups

Even with a fast formula, you can sabotage performance with common errors:

  • Using whole-column references like $A:$A. This makes Excel scan a million rows even if you only have 10,000. Use a defined range or a Table.
  • Mixing text and numbers in the lookup column. If the lookup value is a number but the column has text-formatted numbers, MATCH will fail and return #N/A, which can cause cascading errors.
  • Not locking the lookup column when copying formulas. If you forget the $ signs, the range shifts and you get wrong results, forcing you to debug.
  • Using array formulas when a simple VLOOKUP would do. Array formulas are powerful but slow.

When VLOOKUP Is Still the Right Choice

VLOOKUP isn’t always bad. For small datasets (under 1,000 rows), the speed difference is negligible. If you’re working with a few hundred rows, switching to INDEX/MATCH won’t make a noticeable difference. Also, if you’re the only person using the workbook, and you’re on a modern machine, VLOOKUP might be perfectly fine.

But if you’re building a model that other people will use, or you’re working with tens of thousands of rows, the switch to INDEX/MATCH or XLOOKUP is worth the effort. Your future self will thank you when the sheet recalculates in seconds instead of minutes.

Frequently Asked Questions

Is XLOOKUP always faster than VLOOKUP?

Not always. On small datasets, the difference is negligible. On large datasets, XLOOKUP is generally faster because it’s optimized for modern hardware, but the exact speed depends on your data and Excel version. In most real-world tests, XLOOKUP and INDEX/MATCH are comparable, and both beat VLOOKUP.

Can I use INDEX/MATCH to look up to the left?

Yes, that’s one of its main advantages. VLOOKUP can only return values to the right of the lookup column. INDEX/MATCH can return values from any column, regardless of position.

Does sorting data make VLOOKUP faster?

Only if you use approximate match (TRUE). With exact match (FALSE), sorting has no effect on speed because Excel still scans row by row. If you can sort your data and use TRUE, you’ll get a binary search, which is much faster.

Why does my VLOOKUP return #N/A even though the value exists?

This usually happens when there’s a mismatch in data types—for example, the lookup value is a number but the column contains text, or there are invisible spaces or non-printing characters. Use the TRIM and CLEAN functions to clean your data, and make sure both columns are formatted the same way.

Is there a way to speed up VLOOKUP in Google Sheets?

Yes, the same principles apply. Google Sheets has its own XLOOKUP (available to all users now), and INDEX/MATCH works the same way. Also, consider using QUERY or FILTER for complex lookups, as they can be more efficient.

Does using a Table instead of a range improve VLOOKUP speed?

It can. Excel Tables have a defined size, so Excel doesn’t have to scan empty cells. Also, structured references are easier to read and maintain. The speed gain is modest, but it’s a good practice anyway.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →