XLOOKUP vs VLOOKUP in Google Sheets: When and How to Switch

by Fahim Mahmud Chisti

XLOOKUP vs VLOOKUP in Google Sheets comes down to one difference: VLOOKUP finds a value by column number, XLOOKUP by the actual column you point at. That is why VLOOKUP breaks when someone inserts a column and XLOOKUP does not. Below you get a side-by-side example on sample data, the syntax of both, a step-by-step way to convert old formulas and fixes for #N/A.

Quick answer: Use XLOOKUP for anything you will keep or share. It looks left or right, returns several columns at once, has a built-in “not found” value and keeps working when columns are inserted. VLOOKUP only looks right and depends on a column number.

  1. Find a VLOOKUP such as =VLOOKUP(A2, Products!A:E, 4, FALSE).
  2. Take its first column as the lookup range: Products!A:A.
  3. Turn the column number into a range: column 4 of A:E is Products!D:D.
  4. Write =XLOOKUP(A2, Products!A:A, Products!D:D, "Missing product").
  5. Test a few known keys, including one that does not exist.
In this guide
  1. XLOOKUP vs VLOOKUP on sample data
  2. What XLOOKUP can do that VLOOKUP can’t
  3. Where VLOOKUP still works (and when to keep it)
  4. XLOOKUP syntax in Google Sheets
  5. VLOOKUP refresher (why it breaks)
  6. Convert your VLOOKUPs to XLOOKUPs (step‑by‑step)
  7. Advanced patterns you’ll actually use
  8. Error handling, arrays, and performance tips
  9. INDEX MATCH vs XLOOKUP (do you still need it?)
  10. Implementation guide: migrate a sheet in 30 minutes
  11. Templates and resources
  12. Related guides
  13. Trusted sources and official docs
  14. Common XLOOKUP and VLOOKUP errors
  15. Frequently Asked Questions
  16. Next steps

XLOOKUP vs VLOOKUP on sample data

Here is a small Products tab:

ABCD
1SKUNameCategoryPrice
2SKU-100Desk lampLighting24
3SKU-200Office chairFurniture149
4SKU-300Monitor armAccessories59

On an Orders tab, cell A2 holds SKU-200. These formulas give the following results:

FormulaResult
=VLOOKUP(A2, Products!A:D, 4, FALSE)149
=XLOOKUP(A2, Products!A:A, Products!D:D, "Missing product")149
=XLOOKUP(A2, Products!A:A, Products!B:D, "Missing product")Office chair | Furniture | 149 (three cells)
=XLOOKUP("Office chair", Products!B:B, Products!A:A)SKU-200 (a left lookup VLOOKUP cannot do)
=XLOOKUP("SKU-999", Products!A:A, Products!D:D, "Missing product")Missing product

Now insert a new column at C in Products, for example Color. Price moves to column E. The VLOOKUP range grows to A:E but still asks for column 4, so it now returns Furniture, with no error to warn you. The XLOOKUP reference changes to Products!E:E by itself and still returns 149.

What XLOOKUP can do that VLOOKUP can’t

  • Look left or right: No more rearranging tables just to match on a left column.
  • Return multiple columns at once: Spill a whole row of results in one go.
  • Safe when the layout changes: inserting or moving columns doesn’t break the formula.
  • Built‑in not‑found handling: Friendly messages instead of raw #N/A.
  • Match modes: Exact match, next smaller, or next larger—powerful for pricing tiers and ranges.

Where VLOOKUP still works (and when to keep it)

  • One‑off quick checks in small ad‑hoc tables.
  • Legacy sheets where changing formulas is risky today.
  • Team members who only know VLOOKUP and need a short‑term fix.
However, for any sheet you’ll share, scale, or maintain—prefer XLOOKUP.

XLOOKUP syntax in Google Sheets

The syntax:

=XLOOKUP(search_key, lookup_range, result_range, [missing_value], [match_mode], [search_mode])
Parameters to remember:
  • search_key: the value you’re matching (e.g., an email or SKU)
  • lookup_range: the column or row that contains the key
  • result_range: the column(s) or row(s) to return
  • missing_value (optional): message or value when no match is found
  • match_mode (optional): 0 exact (default), -1 exact or next smaller, 1 exact or next larger, 2 wildcard
  • search_mode (optional): 1 first to last (default), -1 last to first, 2 or -2 binary search on data sorted ascending or descending
  • Exact match (typical lookup): =XLOOKUP(A2, Customers!A:A, Customers!D:D, "Not found")
  • Multiple columns at once (spill): =XLOOKUP(A2, Products!A:A, Products!C:E, "Missing product")
  • Wildcard (match SKU prefix): =XLOOKUP(A2 & "*", Catalog!A:A, Catalog!B:B, "No SKU", 2)
  • Tiered pricing (next smaller): =XLOOKUP(B2, Tiers!A:A, Tiers!B:B, "No tier", -1)

VLOOKUP refresher (why it breaks)

Syntax: =VLOOKUP(search_key, range, index, [is_sorted])
  • Can only return from a column to the right of the search column.
  • Relies on a numeric index; insert a column and your index becomes wrong.
  • is_sorted defaults to TRUE, which needs sorted data and returns approximate matches. Forget to pass FALSE and you get wrong results without an error.
Typical exact‑match pattern (wrapped):
=IFERROR(VLOOKUP(A2, Products!A:E, 4, FALSE), "Missing product")
Compare this to the equivalent XLOOKUP that’s easier to read and harder to break: =XLOOKUP(A2, Products!A:A, Products!D:D, "Missing product")

Convert your VLOOKUPs to XLOOKUPs (step‑by‑step)

  1. Identify the search_key column used in VLOOKUP (first column of the range).
  2. Replace the VLOOKUP range with two ranges: lookup_range and result_range.
  3. Remove the VLOOKUP index; XLOOKUP uses explicit return ranges.
  4. Set [missing_value] to keep user‑friendly messages.
  5. Optional: choose a [match_mode] if you need tiered or wildcard matching.
Example migration: Before (VLOOKUP): =IFERROR(VLOOKUP(A2, SKUs!A:H, 6, FALSE), "No match") After (XLOOKUP): =XLOOKUP(A2, SKUs!A:A, SKUs!F:F, "No match")

Advanced patterns you’ll actually use

Multi‑criteria lookup (email + date)

Build a helper key inline using & and use wildcard if needed.
=ARRAYFORMULA(XLOOKUP(
  A2 & "|" & TEXT(B2, "yyyy-mm-dd"),
  Table!A2:A & "|" & TEXT(Table!B2:B, "yyyy-mm-dd"),
  Table!E2:E,
  "No record"
))
The lookup and result ranges must cover the same rows, so all three start at row 2.

2D lookup (row & column headers)

Combine two XLOOKUPs: one to find the column, one to find the row.
=XLOOKUP(A2, Items!A2:A999,
  XLOOKUP(B1, Items!B1:Z1, Items!B2:Z999),
  "Missing")
The inner XLOOKUP returns the column under the matching header; the outer one picks the row. Both use rows 2 to 999 so the sizes match.

Partial text matches (contains)

=XLOOKUP("*" & A2 & "*", Descriptions!B:B, Descriptions!C:C, "No match", 2)

Return a whole record (spill)

=XLOOKUP(A2, Leads!A:A, Leads!B:G, "Not found")

Error handling, arrays, and performance tips

  • Friendly errors: Use [missing_value] to avoid nested IFERROR in most cases.
  • ARRAYFORMULA: To fill a whole column from one cell, wrap the lookup: =ARRAYFORMULA(XLOOKUP(A2:A, Products!A:A, Products!D:D, "")). This works for a single result column; a multi-column result_range only spills for one search key at a time.
  • Range size: If a sheet gets slow, bound large lookups (A2:A5000 instead of A:A).
  • Data types: Ensure numbers are numbers; stray text digits cause misses. Use VALUE to coerce if needed.

INDEX MATCH vs XLOOKUP (do you still need it?)

INDEX MATCH used to be the flexible alternative to VLOOKUP. XLOOKUP now consolidates that power with clearer syntax and extras like [missing_value] and match modes. Keep INDEX MATCH in your toolkit for niche array gymnastics, but for day‑to‑day business lookups, XLOOKUP wins. INDEX MATCH example for context: =INDEX(Products!D:D, MATCH(A2, Products!A:A, 0)) Equivalent XLOOKUP: =XLOOKUP(A2, Products!A:A, Products!D:D, "Missing product")

Implementation guide: migrate a sheet in 30 minutes

  1. Audit: Find your top 5 VLOOKUP formulas (use Find for “VLOOKUP(”).
  2. Map: For each, write down search key, lookup column, return column(s), and desired not‑found text.
  3. Replace: Convert one formula at a time to XLOOKUP. Test with 3–5 known cases.
  4. Spill where helpful: Replace chains of VLOOKUPs with one XLOOKUP that returns multiple columns.
  5. Document: Add a note near the header: “Uses XLOOKUP, exact match.”
  6. Lock: Protect key ranges to prevent accidental column inserts that could confuse teammates.

Templates and resources

Trusted sources and official docs

Common XLOOKUP and VLOOKUP errors

  • #N/A with no missing_value set: no match was found. Add the fourth argument ("Not found") to show a message, then check why the key is missing.
  • #N/A although the value is clearly there: usually a type or spacing mismatch, such as the number 200 against the text "200", or a trailing space. Clean the key column with TRIM or VALUE, or look up TRIM(A2).
  • #VALUE! about range sizes: lookup_range and result_range cover different rows, for example A2:A100 and D1:D100. Make both start and end on the same rows.
  • #REF! “Array result was not expanded because it would overwrite data”: a multi-column XLOOKUP needs empty cells to its right. Clear them or return fewer columns.
  • VLOOKUP returns a wrong value without an error: the last argument is missing or TRUE, so it does an approximate match on unsorted data; or a column was inserted and the index now points at a different column. Pass FALSE, or switch to XLOOKUP.

Frequently Asked Questions

Is XLOOKUP available in Google Sheets?

Yes. Google Sheets has had XLOOKUP since 2022, with the same core behavior as Excel’s version: separate lookup and result ranges, an optional not-found value, match modes and search modes. Files that use it keep working when you download them for current versions of Excel.

Why does my XLOOKUP return #N/A?

Because no row matched the search key exactly. The usual causes are numbers stored as text, extra spaces or a slightly different spelling. Clean the data with TRIM or VALUE, and set the fourth argument so real misses show a clear message instead of #N/A.

Can XLOOKUP look to the left?

Yes. Unlike VLOOKUP, XLOOKUP can return from any column or row, because the result range is separate from the lookup range. Point result_range at a column to the left of the key, as in the "Office chair" example above.

Should I still learn INDEX MATCH?

It is worth understanding, because many older sheets use it and it works in every spreadsheet app. For new formulas in Google Sheets, XLOOKUP covers almost all INDEX MATCH cases with shorter syntax and a built-in not-found value.

Which is faster, XLOOKUP or VLOOKUP?

For normal business sheets the speed difference is too small to notice. XLOOKUP can make a sheet lighter overall, because one formula can return several columns where you needed several VLOOKUPs. Bounding ranges such as A2:A5000 matters more for speed than the choice of function.

Next steps

Search your sheet for VLOOKUP(, convert the five formulas that break most often, and test each with a known key and a missing one. If you repeat the same lookup in many places, wrap it in a reusable formula with Google Sheets named functions. For filtering and summarizing rather than single lookups, use the QUERY function.

all_in_one_marketing_tool