Quick Answer Use XLOOKUP if you have Microsoft 365 or Excel 2021+ — it is simpler, more flexible and handles errors by default. Use INDEX MATCH if you need to support older Excel versions or want left-column lookups without XLOOKUP. Use VLOOKUP only when the workbook will be used on very old Excel and you are looking up data to the right of the key column. All three do the same core job — find a match and return a related value — but they differ in flexibility, error handling and version compatibility.

Sample Dataset

All examples in this guide use the following product table. Imagine this is your reference table on a sheet called Products:

Column A: Product CodeColumn B: Product NameColumn C: CategoryColumn D: Price (₹)Column E: Stock
P001Wireless MouseElectronics850120
P002USB HubElectronics65085
P003Notebook A5Stationery45500
P004Mechanical KeyboardElectronics240030
P005Desk LampFurniture120060
P006Ballpoint Pen (12pk)Stationery80800

Your task: a user types a Product Code in cell H2. You need formulas that return the Product Name, Category, Price and Stock for that code.

VLOOKUP: Syntax, Example and Limitations

Syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Examples Using the Sample Dataset

Assume the Products table is in cells A1:E7 (header row + 6 data rows):

=VLOOKUP(H2, $A$2:$E$7, 2, FALSE)   → Returns Product Name
=VLOOKUP(H2, $A$2:$E$7, 3, FALSE)   → Returns Category
=VLOOKUP(H2, $A$2:$E$7, 4, FALSE)   → Returns Price
=VLOOKUP(H2, $A$2:$E$7, 5, FALSE)   → Returns Stock

If H2 = "P003", these four formulas return: Notebook A5, Stationery, 45, 500.

Limitations of VLOOKUP

INDEX MATCH: Two Functions, One Powerful Lookup

How It Works

INDEX MATCH is not a single function — it is a combination. MATCH finds the row number. INDEX uses that row number to return a value from any column you choose.

MATCH(lookup_value, lookup_range, 0)  → Returns the ROW number (position)
INDEX(return_range, row_number)       → Returns the VALUE at that row

Syntax Combined

=INDEX(return_column, MATCH(lookup_value, lookup_column, 0))

Examples Using the Sample Dataset

=INDEX($B$2:$B$7, MATCH(H2, $A$2:$A$7, 0))   → Product Name
=INDEX($C$2:$C$7, MATCH(H2, $A$2:$A$7, 0))   → Category
=INDEX($D$2:$D$7, MATCH(H2, $A$2:$A$7, 0))   → Price
=INDEX($E$2:$E$7, MATCH(H2, $A$2:$A$7, 0))   → Stock

Advantages Over VLOOKUP

Two-Way Lookup Example

Suppose you have a table of regional monthly targets with months as column headers and regions as row headers. Find the target for "North" in "March":

=INDEX(B2:M10, MATCH("North", A2:A10, 0), MATCH("March", B1:M1, 0))

XLOOKUP: The Modern Replacement

Syntax

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

Examples Using the Sample Dataset

=XLOOKUP(H2, $A$2:$A$7, $B$2:$B$7, "Not found")   → Product Name
=XLOOKUP(H2, $A$2:$A$7, $C$2:$C$7, "Not found")   → Category
=XLOOKUP(H2, $A$2:$A$7, $D$2:$D$7, "Not found")   → Price
=XLOOKUP(H2, $A$2:$A$7, $E$2:$E$7, "Not found")   → Stock

Return Multiple Columns in One Formula

XLOOKUP can return an entire row — multiple columns at once — with a single formula:

=XLOOKUP(H2, $A$2:$A$7, $B$2:$E$7, "Not found")

This single formula spills results across four cells: Product Name, Category, Price and Stock. No need to write four separate formulas.

Version Compatibility Note

XLOOKUP Version Compatibility
  • Microsoft 365 (all versions): Available
  • Excel 2021: Available
  • Excel for the Web: Available
  • Excel 2019: NOT available
  • Excel 2016: NOT available
  • Excel 2013 and earlier: NOT available
  • Google Sheets: NOT available (use VLOOKUP or INDEX MATCH)

Error Handling Comparison

If the lookup value does not exist in the table:

FunctionDefault behaviour when not foundHow to handle errors
VLOOKUPReturns #N/A errorWrap in IFERROR: =IFERROR(VLOOKUP(...),"Not found")
INDEX MATCHReturns #N/A errorWrap in IFERROR or IFNA: =IFERROR(INDEX(MATCH(...)),"Not found")
XLOOKUPBuilt-in 4th argument handles itJust pass a 4th argument: =XLOOKUP(H2,A:A,B:B,"Not found")

Full Comparison Table

FeatureVLOOKUPINDEX MATCHXLOOKUP
Excel versionAll versionsAll versionsMicrosoft 365, Excel 2021+
Can look left of key columnNoYesYes
Built-in error handlingNo (needs IFERROR)No (needs IFERROR)Yes (4th argument)
Returns multiple columnsNo (one column per formula)No (one column per formula)Yes (spill across columns)
Two-way lookupNoYes (nested MATCH)Partial (nested XLOOKUP)
Fragile to column insertsYes (breaks silently)NoNo
Wildcard searchYesYes (with MATCH type)Yes (match_mode=2)
Find last match instead of firstNoRequires workaroundYes (search_mode=-1)
Approximate matchYes (range_lookup=TRUE)Yes (MATCH type 1 or -1)Yes (match_mode=-1 or 1)
Formula readabilityModerateVerbose but clearMost readable

When to Use Which

Trainer's Practical Advice

From Sreemathy Sampath, Lead Trainer

The biggest mistake I see freshers make is treating VLOOKUP, INDEX MATCH and XLOOKUP as if choosing the "right" one is the important decision. The important decision is understanding what a lookup function does: find a match in one column, return a related value from another. Once that concept is clear, switching between functions takes 5 minutes. What actually takes time — and what interviews test — is whether you can diagnose why a lookup formula returns the wrong answer. Extra spaces? Mismatched data types? Approximate match instead of exact? Those are the real skills. Learn all three functions, but spend twice as much time debugging broken lookups on messy data.

Common Mistakes

MistakeFunctionFix
Using range_lookup=TRUE (or omitting 4th arg) when exact match is neededVLOOKUPAlways include FALSE as the 4th argument for exact match
Selecting the wrong starting column in table_arrayVLOOKUPThe first column of table_array must be the lookup column. If your data starts at column C, your array starts at C, not A.
Forgetting to use 0 as the 3rd MATCH argumentINDEX MATCHMATCH with no 3rd argument or 1 means approximate match — always write MATCH(value, range, 0) for exact match
Not locking references with $All threeAlways use absolute references ($A$2:$A$100) for the lookup table so formulas copied across rows do not shift the range
Lookup value has leading/trailing spacesAll threeWrap the lookup value in TRIM: =XLOOKUP(TRIM(H2), ...)
Number stored as text in one table, number in the otherAll threeUse VALUE() to convert text-numbers to numbers, or TEXT() to match text format

3 Practice Questions

Question 1

You have a customer table where Customer ID is in column B and Customer Name is in column A. You want to look up a Customer ID (in cell F2) and return the Customer Name. Which function can do this most easily and why?

Answer: XLOOKUP or INDEX MATCH — because the return column (A) is to the LEFT of the lookup column (B). VLOOKUP cannot look left. XLOOKUP formula: =XLOOKUP(F2, $B$2:$B$100, $A$2:$A$100, "Not found"). INDEX MATCH formula: =INDEX($A$2:$A$100, MATCH(F2, $B$2:$B$100, 0))

Question 2

Your VLOOKUP formula is returning #N/A even though you can see the matching value in the table. The lookup column contains employee codes like "EMP001". What are the three most likely causes?

Answer: (1) Extra spaces in the table or lookup value — use TRIM(). (2) Data type mismatch — the lookup value is a number but the table column stores text (or vice versa). (3) The 4th argument (range_lookup) is omitted or TRUE — in sorted data this can return unexpected approximate matches.

Question 3

You need to find the sales figure for "South" region in "Q2" from a cross-tab table. The regions run down the rows (column A) and quarters run across the columns (row 1). Write the formula.

Answer: Use INDEX MATCH with two MATCH functions: =INDEX(B2:E10, MATCH("South", A2:A10, 0), MATCH("Q2", B1:E1, 0)). Alternatively: =XLOOKUP("South", A2:A10, XLOOKUP("Q2", B1:E1, B2:E10))

Key Takeaways
  • VLOOKUP is the most widely known but has the most limitations — column must be leftmost, column number is fragile, no built-in error handling.
  • INDEX MATCH works in all Excel versions and can look in any direction — use it for older workbooks and two-way lookups.
  • XLOOKUP is the modern choice for Microsoft 365 users — cleaner syntax, built-in error handling, can return multiple columns.
  • All three return #N/A (or "Not found") when the lookup value has spaces or data type mismatches with the table. Always check with TRIM and VALUE.
  • Learn all three. Interviewers test VLOOKUP specifically. Real work increasingly uses XLOOKUP. Index MATCH is the professional fallback.

Want to Practice Lookup Functions with Real Datasets?

Linkskill Academy's Data Analyst training includes hands-on Excel practice sessions with real-world messy datasets — not textbook examples. You will build lookup formulas that work under real conditions.

Live instructor-led · Online & Offline · Salem, Tamil Nadu · Batches available
Enquire on WhatsApp

Frequently Asked Questions

Should I still learn VLOOKUP if XLOOKUP exists?

Yes. VLOOKUP is still widely tested in Excel interviews. Many companies use older Excel versions that do not support XLOOKUP. Understanding VLOOKUP also builds the conceptual foundation for XLOOKUP — once you understand lookup functions through VLOOKUP, learning XLOOKUP takes less than 30 minutes.

When should I use INDEX MATCH instead of XLOOKUP?

Use INDEX MATCH when: (1) you need to work with Excel 2016 or earlier, (2) the workbook will be shared with users on older Excel versions, or (3) you need a two-way lookup that references both row and column headers simultaneously. In Microsoft 365 or Excel 2021+, XLOOKUP handles most of these scenarios more cleanly.

What is the main limitation of VLOOKUP?

VLOOKUP has three main limitations: (1) the lookup column must always be the leftmost column in the range — it cannot look to the left, (2) you reference columns by number which breaks if columns are inserted or deleted, and (3) it does not handle errors gracefully without wrapping in IFERROR. XLOOKUP fixes all three.

Is XLOOKUP available in all Excel versions?

No. XLOOKUP is available in Microsoft 365, Excel 2021 and Excel for the web. It is NOT available in Excel 2016, Excel 2019, or older versions. If your workbook needs to work on older Excel, use VLOOKUP or INDEX MATCH instead.

Can XLOOKUP replace INDEX MATCH completely?

For most single-column lookups, yes. XLOOKUP handles left-lookup, error handling, approximate match, and returning multiple columns in one formula. However, for advanced two-dimensional lookups (matching both a row and a column header simultaneously), INDEX MATCH with two MATCH functions is still useful.

Why does my VLOOKUP return the wrong value?

The most common causes are: (1) using approximate match (TRUE or 1 as the 4th argument) when exact match is needed, (2) extra spaces in the lookup value or the table — use TRIM() to fix these, (3) the lookup value and table column are different data types (one is a number, the other is text) — use VALUE() to standardise, or (4) the table reference is not locked with $ when copying the formula down rows.