FormulaFix · Plain-English guides to Excel and Google Sheets formulas

XLOOKUP vs VLOOKUP: Which One Should You Use?

Understanding VLOOKUP

VLOOKUP (vertical lookup) is the classic Excel function for pulling data from a table based on a matching value in the left‑most column.

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Argument Description
lookup_value The value you want to find (e.g., a product code).
table_array The range that contains both the lookup column and the return column.
col_index_num The column number (starting at 1) within table_array to return.
range_lookup OPTIONAL – TRUE (default) for an approximate match, FALSE for an exact match.

Simple example

A (Code) B (Item) C (Price)
A001 Widget 12.50
A002 Gizmo 9.75
A003 Doohickey 15.20
=VLOOKUP("A002", A2:C4, 3, FALSE)

Result: 9.75

Key points to remember


Introducing XLOOKUP

XLOOKUP is Microsoft’s modern replacement for both VLOOKUP and HLOOKUP. It first appeared in Excel 2021 and is available to anyone with a Microsoft 365 subscription. Google Sheets does not have a native XLOOKUP; the same behavior can be reproduced with INDEX + MATCH or the newer LOOKUP functions.

Why XLOOKUP matters

Feature XLOOKUP VLOOKUP
Search direction Left‑to‑right or right‑to‑left (vertical or horizontal) Only left‑to‑right; lookup column must be leftmost
Exact‑match default Returns exact match unless you change match_mode Defaults to approximate match; you must add FALSE for exact
Array return Can spill multiple columns or rows in one formula Returns a single column; you need separate calls for more data
Error handling Built‑in if_not_found argument Requires wrapping with IFERROR or IFNA
Performance Scans the two arrays once, generally faster on large tables May scan the lookup column repeatedly for each column requested

Basic syntax

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

Quick example

A (Product) B (Price)
A001 12.50
A002 9.75
A003 15.20
=XLOOKUP("A002", A2:A4, B2:B4, "Not found")

Result: 9.75


Key Differences Between XLOOKUP and VLOOKUP

Feature XLOOKUP VLOOKUP
Lookup direction Works vertically and horizontally; can replace HLOOKUP. Vertical only; separate HLOOKUP needed for horizontal look‑ups.
Column/row index No column number needed; you point directly to the return array. Requires a static column‑index number.
Match modes Exact (default) plus next‑larger, next‑smaller, wildcard, and binary search options. Exact (FALSE) or approximate (TRUE) only.
Search order First‑to‑last or last‑to‑first (useful for “most recent” matches). Always top‑to‑bottom.
Missing‑value handling if_not_found argument provides a custom result. Returns #N/A unless wrapped in IFERROR/IFNA.
Performance Generally faster because it reads only two arrays. Can be slower, especially with many columns.
Compatibility Excel 365, Excel 2021+, and later. Not in Excel 2019 or earlier. All modern Excel versions (2007‑2019) and Google Sheets.
Google Sheets support Not native; must use INDEX + MATCH or LOOKUP. Fully supported.

Takeaway: If you have a recent version of Excel, XLOOKUP gives you a single, flexible formula for most lookup scenarios. If you need to share workbooks with older Excel users or with Google Sheets, VLOOKUP (or INDEX/MATCH) remains the safe choice.


When to Use XLOOKUP Over VLOOKUP

Situation Recommended function
You need to look left of the key column XLOOKUP (or INDEX/MATCH in older Excel)
You want a single formula that returns multiple columns XLOOKUP
You prefer built‑in error handling (if_not_found) XLOOKUP
Your workbook must run in Excel 2019 or earlier or Google Sheets VLOOKUP (or INDEX/MATCH)
You’re working with very large tables and performance matters XLOOKUP (generally faster)

Sample comparison

ID Product Price
101 Apple 0.50
102 Banana 0.30
103 Cherry 0.75

XLOOKUP (Excel 2021/365)

=XLOOKUP(102, A2:A4, C2:C4, "Not found")

Result: 0.30

VLOOKUP (all Excel versions, Google Sheets)

=VLOOKUP(102, A2:C4, 3, FALSE)

Result: 0.30


Common Pitfalls and How to Avoid Them

Pitfall Why it happens How to fix it
Forgot to lock the lookup array Relative references shift when copying the formula. Use absolute references ($A$2:$A$100) or name the range.
Using the wrong match mode Omitting the argument can trigger an approximate match on unsorted data. Explicitly set the mode: ... , FALSE) for VLOOKUP or ... , 0) for XLOOKUP.
Looking left with VLOOKUP VLOOKUP can only search the leftmost column. Switch to XLOOKUP, or use INDEX/MATCH.
Not handling missing values #N/A appears when the key isn’t found. Provide a fallback: =XLOOKUP(...,"Not found") or =IFERROR(VLOOKUP(...),"Not found").
Assuming XLOOKUP works in older Excel XLOOKUP isn’t available before Excel 2021/365. Keep VLOOKUP (or INDEX/MATCH) for compatibility.

Conclusion: Choosing the Right Lookup Function

Factor XLOOKUP VLOOKUP
Availability Excel 365, Excel 2021+, not in older Excel; not native in Google Sheets. All Excel versions (2007‑2019) and Google Sheets.
Lookup direction Left‑to‑right or right‑to‑left; vertical or horizontal. Only left‑to‑right vertical.
Exact‑match default Exact match by default. Approximate match by default; must add FALSE for exact.
Multiple‑column return Can spill a range of columns. One column per formula.
Missing‑value handling if_not_found argument. Requires IFERROR/IFNA.
Performance Faster on large tables (single pass). May be slower, especially with many columns.

Quick decision guide

  1. Do you have Excel 365/2021 or Google Sheets?
    Yes → Prefer XLOOKUP for its flexibility.
    No → Stick with VLOOKUP (or INDEX/MATCH).

  2. Do you need to retrieve data left of the lookup column?
    Use XLOOKUP; otherwise VLOOKUP will need a workaround.

  3. Is backward compatibility essential?
    Choose VLOOKUP if the file will be opened in older Excel versions.


FAQ

What is the main advantage of XLOOKUP over VLOOKUP?

XLOOKUP lets you search both left‑to‑right and right‑to‑left, returns exact matches by default, and includes a built‑in if_not_found argument, eliminating the need for extra error‑handling wrappers.

Can XLOOKUP replace VLOOKUP in older Excel versions?

No. XLOOKUP is only available in Excel 2021, Excel 365, and later. For Excel 2019 or earlier you must continue using VLOOKUP or combine INDEX + MATCH.

How does XLOOKUP handle missing values?

If the lookup fails, XLOOKUP returns the optional if_not_found value you specify (e.g., "Not found"). If you omit this argument, it returns #N/A, just like VLOOKUP.

Is XLOOKUP available in Google Sheets?

Google Sheets does not have a native XLOOKUP function. You can mimic its behavior with INDEX + MATCH or the newer LOOKUP functions, but the exact syntax differs.

What are the performance differences between XLOOKUP and VLOOKUP?

XLOOKUP reads only the two arrays you specify and stops after finding the first (or last) match, making it generally faster on large datasets. VLOOKUP may scan the entire lookup column for each requested column, which can be slower, especially when many columns are involved.