📥 Master XLOOKUP and VLOOKUP with Hands-On Practice

Want to get the most out of this guide? Download the free practice workbook 👉 HERE and follow along step by step.

What These Functions Do

Both XLOOKUP and VLOOKUP help you find specific data in a table and return related information.

Imagine looking up a word in a book’s index to find the page number—Excel’s lookup functions work the same way. But while VLOOKUP has limitations, XLOOKUP offers more flexibility and fewer errors.

Let’s break it down.

VLOOKUP: The Traditional Lookup Function

VLOOKUP has been around for years and is designed to search for data in a vertically organized table.

It requires four key inputs:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  • lookup_value – What you’re looking for.
  • table_array – Where to look. The lookup value must be in the first column.
  • col_index_num – The column number that contains the result you need.
  • [range_lookup] (optional) – Choose 0 (FALSE) for an exact match or 1 (TRUE) for an approximate match. If left blank, Excel assumes an approximate match.

To learn more about VLOOKUP, read this article HERE.

XLOOKUP: : The More Flexible Alternative

XLOOKUP is a more powerful, flexible function that eliminates VLOOKUP’s biggest limitations.

Instead of specifying a column number, you can define exactly where to search and where to return results.

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
  • lookup_value – What you’re looking for.
  • lookup_array – Where to search (e.g., a column of names).
  • return_array – Where to find the result (e.g., a column of phone numbers).
  • [if_not_found] (optional) – Define a custom message like "Not found" instead of an error.
  • [match_mode] (optional) – Default is an exact match (0). Other options:
    • -1 = exact match or next smallest
    • 1 = exact match or next larger
    • 2 = wildcard match
  • [search_mode] (optional) – Default is first-to-last (1). Other options:
    • -1 = search last-to-first
    • 2 = binary search (ascending)
    • -2 = binary search (descending)

To learn more about XLOOKUP, read this article HERE.

Featured Course

Excel Essentials for the Real World

Get started learning Excel the right way. Our members report a new enthusiasm for Excel after taking our course. We’re confident you will too.
Learn More

VLOOKUP vs. XLOOKUP: Which One Should You Use?

The best choice depends on your Excel version and what you need to do.

  • Use XLOOKUP if you have Excel 2021 (and above) or Microsoft 365. It’s more flexible, accurate, and powerful, eliminating many of VLOOKUP’s limitations.
  • Use VLOOKUP if you’re working with older Excel versions or need a quick, simple lookup without advanced features.

If you have access to XLOOKUP, it’s the better option—it works in any direction, avoids column number issues, and handles missing values more gracefully.

But if you’re using an older version, VLOOKUP can still get the job done.

Key Differences: XLOOKUP vs VLOOKUP

Both XLOOKUP and VLOOKUP help you find data in Excel, but they work differently.

Understanding these differences can help you choose the right one for your needs.

Difference 1: Lookup to the Left

One of VLOOKUP’s biggest limitations is that it can only search to the right of the lookup column. If the data you need is to the left, VLOOKUP won’t work without a complex workaround.

XLOOKUP is more flexible—it allows you to search both left and right, making lookups easier and reducing errors.

Example:

Imagine you have an employee list where Column A has employee names and Column B has employee IDs.

You want to find a name using an ID.

  • VLOOKUP fails ❌ because it can’t search left (Column A is to the left of Column B).
  • XLOOKUP works ✅ because it can look in any direction—left or right.

Difference 2: Exact Match by Default

One of the most common VLOOKUP mistakes happens when you forget to specify an exact match.

  • If you don’t set the "range_lookup" argument, VLOOKUP tries to find the next best thing (approximate match). But this can lead to mistakes.

XLOOKUP avoids this problem by using exact match as the default. If it doesn’t find the value, it simply returns an error or a custom message—not the wrong data.

Example

Suppose you’re searching for ID999, but it doesn’t exist in the employee list.

  • VLOOKUP might return the wrong ID ❌ (unless you explicitly set "FALSE" for an exact match).
  • XLOOKUP returns nothing or an error ✅—which prevents lookup mistakes.

Bottom line: XLOOKUP is safer because it always looks for an exact match unless you tell it otherwise. No more unexpected results!

Difference 3: Adding or Removing Columns

One big issue with VLOOKUP is that it relies on column numbers to find the answer.

  • If you insert, delete, or move columns, VLOOKUP breaks because the column index number no longer matches the data structure.
  • You’ll have to manually update the formula every time the table changes.

Bottom line: XLOOKUP is more reliable because it works with specific column references, not numbers.

Example

Imagine your formula pulls employee names from Column 3 in a table.

XLOOKUP vs VLOOKUP cannot handle if new column is inserted in range.
  • If you add a new column, VLOOKUP keeps pointing to Column 3, but now it’s the wrong data! ❌
  • XLOOKUP adapts automatically ✅ because it searches based on the exact columns you select.

Bottom line: If your data changes often, XLOOKUP is the smarter choice—it won’t break when columns move!

Difference 4: Error-Handling When There Is No Match

When VLOOKUP can’t find a match, it simply returns an #N/A error, which can be frustrating. To prevent this, you have to manually wrap it inside an IFERROR function.

XLOOKUP makes this easier with its built-in “if_not_found” argument. Instead of an error, you can choose a custom message like “Not Found” or "ID Not in List".

Example

You’re searching for ID14, but it’s not in the employee list.

XLOOKUP vs VLOOKUP returns error if no match is found
  • VLOOKUP result ❌ → #N/A error
  • XLOOKUP result ✅ → "Not Found" (or any message you define)

Bottom line: XLOOKUP saves time and improves clarity—no more extra formulas just to handle missing values!

Difference 5: Search Direction

By default, VLOOKUP always searches from top to bottom and stops at the first match it finds. This can be a problem when working with historical data, price changes, or employee job history.

XLOOKUP is more flexible—it allows you to search from bottom to top using the search_mode argument.

Example

Imagine you need to find Kim West’s current department, but she has worked in multiple divisions:

  • VLOOKUP result ❌ → Utilities (because it stops at the first match).
  • XLOOKUP result ✅ → Games (if you use search_mode = -1, it finds the last occurrence).

Bottom line: If your data updates over time, XLOOKUP ensures you get the most recent entry—not just the first one!

Difference 6: Approximate Match Without Sorting

Both VLOOKUP and XLOOKUP can find approximate matches, which is useful for tasks like converting scores into letter grades. However, there’s a key difference:

  • VLOOKUP requires the lookup table to be sorted in ascending order. If it’s not, it may return the wrong result.
  • XLOOKUP works even if the table is unsorted, making it more reliable.

Example

Imagine you have a table that assigns letter grades based on test scores. You want to find a student’s grade based on their test score in Column C:

Approximate Match With Sorting
  • VLOOKUP result ❌ → Only correct if the table is sorted.
  • XLOOKUP result ✅ → Always correct, even if the table is out of order.
Approximate Match Without Sorting

Bottom line: XLOOKUP is more reliable for approximate matches—no need to worry about sorting your data first!

Conclusion

VLOOKUP has been a go-to function in Excel for years. It still works well for basic tasks, but its limitations can cause errors—especially with left lookups, column changes, and unsorted data.

XLOOKUP solves these issues, making it the better choice for most users. It’s more flexible, accurate, and reliable. However, it’s only available in Excel 2021 (and above) and Microsoft 365, so files using XLOOKUP won’t work in older Excel versions.

What Should You Do?

  • If VLOOKUP works fine for you, no need to rush to switch.
  • If you struggle with VLOOKUP’s limits, learning XLOOKUP is worth it.
  • Since many Excel files still use VLOOKUP, knowing both functions is a smart move.

Download the Practice Workbook

Want to master XLOOKUP and VLOOKUP? Download our free practice workbook and try these techniques for yourself.

Featured Bundle

Black Belt Excel Bundle

This Excel Black Belt Package includes EIGHT of our Popular Courses. You’ll learn high-value, in-depth Excel skills that solve real problems.
Learn More
Excel Black Belt Bundle XelPlus

Leila Gharani

I’ve spent over 20 years helping businesses use data to improve their results. I've worked as an economist and a consultant. I spent 12 years in corporate roles across finance, operations, and IT—managing SAP and Oracle projects.

As a 7-time Microsoft MVP, I have deep knowledge of tools like Excel and Power BI.

I love making complex tech topics easy to understand. There’s nothing better than helping someone realize they can do it themselves. I’m always learning new things too and finding better ways to help others succeed.