Home  /  Blog  /  Lookup & Filter
Lookup & Filter

Excel Lookup Functions — VLOOKUP, XLOOKUP, INDEX+MATCH and FILTER Explained

By admin 26 November 2026 Lookup & Filter

A lookup answers one question: “Find this value in one list, then give me the matching value from another list.” You have a code and you need its price. You have a price and you need its product name. You have a region and you need every order from it. Excel has four functions for this job — VLOOKUP, XLOOKUP, INDEX+MATCH and FILTER — and they all do the same thing on the same table. They differ in how you describe the job, how they break, and which Excel versions have them. This page puts all four on one table, with the same answer, so you can see the differences instead of taking them on trust — and then tells you which one to use for your situation. It is one of the eight topic pages of the Excel Formulas hub.

Quick takeaway: if you have Microsoft 365 or Excel 2021 or later, use XLOOKUP.

  • XLOOKUP — the default if your version has it. Exact match by default, looks left or right, has a built-in “not found” answer.
  • INDEX+MATCH — the same job in two steps, works in every version. Use it when the file must open in Excel 2019 or earlier.
  • VLOOKUP — the classic. Works everywhere, but only looks right, and its column number breaks when you insert a column. Always write FALSE as the fourth argument.
  • FILTER — when one match is not enough and you need every matching row.
Excel Lookup Functions — VLOOKUP, XLOOKUP, INDEX+MATCH and FILTER Explained

The Table Every Example Uses

Every formula on this page runs on the same four-row product table — the same table used in the XLOOKUP vs VLOOKUP guide, so the answers match that guide exactly.

ABCDE
SKUProductCategoryPriceStock
101Laptop StandAccessories45120
102Standing DeskFurniture39912
103Office ChairFurniture24930
104Monitor ArmAccessories8975

The job: find the price of SKU 102. The answer is 399 — in every formula below.

VLOOKUP — The Classic

=VLOOKUP(102, A2:E5, 4, FALSE)

Find 102 in the first column of A2:E5, then count 4 columns across (A=1, B=2, C=3, D=4) and return the price: 399. The FALSE at the end forces an exact match.

VLOOKUP is the function most people learn first, and it works in every version of Excel. It has three weaknesses, and they are the reason the other functions exist:

  • It only looks to the right. The lookup column must be first in the range. If the price sits to the left of the code, VLOOKUP cannot do the job at all.
  • The column number breaks. Insert a new column between Category (C) and Price (D) and the price moves from column 4 to column 5 — but =VLOOKUP(102, A2:F5, 4, FALSE) still says 4, and now returns the new blank column instead of the price. No error, wrong answer.
  • Exact match is not the default. Leave out FALSE and VLOOKUP does an approximate match, assuming the lookup column is sorted. On unsorted data it returns a confident wrong value with no error. Always write FALSE.

Use VLOOKUP for quick checks in a simple sheet you control, and for files that must open in Excel 2019 or earlier where you do not want INDEX+MATCH. Never use it without FALSE.

XLOOKUP — The Modern Default

=XLOOKUP(102, A2:A5, D2:D5)

Search A2:A5 for 102, return the matching item from D2:D5: 399. No counting, and exact match is already the default.

XLOOKUP fixes every VLOOKUP weakness: separate lookup and return ranges, so inserting a column moves the return range with the data; it looks left or right; exact match is the default; and it has a built-in fourth argument for the not-found case:

=XLOOKUP(999, A2:A5, D2:D5, "Not found")

That returns “Not found” instead of #N/A. It also returns a whole row at once — =XLOOKUP(102, A2:A5, B2:E5) spills Standing Desk / Furniture / 399 / 12 — and it can search from the last match backwards, which is how you find the most recent order.

The one limit: XLOOKUP needs Microsoft 365, Excel 2021 or Excel 2024. It does not exist in Excel 2019 or earlier. If everyone opening the file has a newer version, make XLOOKUP your default lookup.

INDEX+MATCH — The Flexible Workhorse

=INDEX(D2:D5, MATCH(102, A2:A5, 0))

Two functions doing one job, inside out: MATCH finds which row the key is in — MATCH(102, A2:A5, 0) is 2 — and INDEX returns the value at that row of the column you named — INDEX(D2:D5, 2) is D3, which is 399.

The column is a real reference, not a counted number, so inserting a column moves it correctly. It looks in either direction, which VLOOKUP cannot. And it works in every version of Excel, which is why it is the right choice when a workbook must open in Excel 2019 or earlier.

The 0 in MATCH is the same trap as VLOOKUP’s FALSE: it means exact match, and omitting it gives you approximate. Always write it.

FILTER — When One Match Is Not Enough

=FILTER(A2:E5, C2:C5="Furniture")

Returns every row where the test is true — a live list, not one value. On the table above it returns rows 102 and 103:

SKUProductCategoryPriceStock
102Standing DeskFurniture39912
103Office ChairFurniture24930

FILTER is the lookup for “give me all of them”, and it needs Microsoft 365, Excel 2021 or Excel 2024. It is the only function on this page that returns more than one row, and it is the one people reach for right after they master XLOOKUP. Full guide: FILTER Function in Excel.

The Four, Side by Side

VLOOKUPXLOOKUPINDEX+MATCHFILTER
Price of SKU 102=VLOOKUP(102,A2:E5,4,FALSE) → 399=XLOOKUP(102,A2:A5,D2:D5) → 399=INDEX(D2:D5,MATCH(102,A2:A5,0)) → 399— (returns rows, not one value)
Looks left of the keyNoYesYesYes (filters any column)
Survives a column insertNoYesYesYes
Exact match by defaultNo — always write FALSEYesNo — always write 0 in MATCHExact by default
“Not found” messageNeeds IFNA wrapped around itBuilt-in fourth argumentNeeds IFNA wrapped around itOptional third argument
Returns many rowsNoNo (one match)NoYes — its whole job
Available inEvery versionMicrosoft 365 / 2021 / 2024Every versionMicrosoft 365 / 2021 / 2024
Easiest to writeHard — count the columnEasy — point at two rangesMedium — one function inside anotherEasy — point at the table and the test

Which Lookup Should You Use?

SituationUse
Microsoft 365 or Excel 2021+XLOOKUP
File shared with Excel 2019 or earlierINDEX+MATCH
Quick check in a simple sheet you controlVLOOKUP — with FALSE, every time
You need the value to the left of the keyXLOOKUP or INDEX+MATCH (VLOOKUP cannot)
You need every matching row, not oneFILTER
The value might not be there, and #N/A would confuse the readerXLOOKUP with its fourth argument, or IFNA around VLOOKUP / INDEX+MATCH
The most recent match, not the firstXLOOKUP with search from last, or INDEX+MATCH with a helper

What #N/A Actually Means

Every Excel lookup is a left join: it keeps your row and puts #N/A in the cell when there is no match. #N/A is not an error in your formula — it is the lookup telling you the value is not in the list. Before you fix the formula, check three things:

  • The value is really there. Extra spaces are the most common cause — “102 ” with a trailing space is not 102. TRIM the lookup column first.
  • The types match. A number 102 and the text “102” are different values to a lookup. If one column came from a download, it may be text.
  • The range covers the row. A range of A2:A4 does not contain the value in A5. Extend the range, or use a whole column.

If the value is genuinely missing, say so in the formula instead of showing #N/A: XLOOKUP’s fourth argument does it cleanly, and IFNA does it for the others — =IFNA(VLOOKUP(102,A2:E5,4,FALSE),"Not found").

Frequently Asked Questions

What is a lookup function in Excel? A function that finds a value in one list and returns the matching value from another list — for example, finding the price of a product code.

Which lookup function should I use? If you have Microsoft 365 or Excel 2021 or later, use XLOOKUP. If the file must open in Excel 2019 or earlier, use INDEX+MATCH. VLOOKUP still works for quick checks, with FALSE every time.

Is VLOOKUP obsolete? No. It works in every version and is fine for quick checks in a simple sheet. For files that will be maintained, INDEX+MATCH or XLOOKUP is safer, because VLOOKUP’s column number breaks when the layout changes.

What is the difference between VLOOKUP and XLOOKUP? XLOOKUP searches one range and returns from another, so it looks left or right and survives column inserts; VLOOKUP searches the first column of a range and counts across, so it only looks right and breaks on inserts. XLOOKUP matches exactly by default; VLOOKUP needs FALSE written every time.

What does INDEX+MATCH do that VLOOKUP cannot? It looks left of the key column, and it survives column inserts, because the return column is a real reference instead of a counted number. It works in every Excel version.

Why does my lookup return #N/A when the value is right there? Usually an extra space, or a number stored as text. Check for trailing spaces with TRIM, and check that the lookup value and the lookup column are the same type — both numbers or both text.

Can a lookup return more than one row? Yes — FILTER returns every matching row. VLOOKUP, XLOOKUP and INDEX+MATCH return one match each.

That is the whole lookup family, on one table: VLOOKUP for the files everyone can open, XLOOKUP as the default when your version has it, INDEX+MATCH when the file must travel to older Excel, and FILTER when one match is not enough. Learn them in that order and you will never be stuck choosing — the situation picks the function, not the other way round. For the full worked guides, start with the XLOOKUP vs VLOOKUP comparison and the FILTER function guide, and when you want the ten most-used formulas on one page, the Excel Formulas Cheat Sheet is next.


About admin

Author of Excel formula guides on this blog.

View all guides by admin →

Keep Learning

Related guides