Excel Lookup Functions: VLOOKUP, XLOOKUP, INDEX MATCH Guide
Master Excel lookup functions with side-by-side comparisons of VLOOKUP, XLOOKUP, HLOOKUP and INDEX MATCH plus syntax, errors and practice.

Excel lookup functions pull a value from one place in your spreadsheet and drop it where you actually need it, and that single trick is the backbone of almost every report you will ever build. If you have ever tried to match an order number to a customer name, a product code to a price, or an employee ID to a department, you have already needed a lookup.
The trouble is, Excel offers half a dozen functions that all do something similar — VLOOKUP, HLOOKUP, LOOKUP, XLOOKUP, INDEX MATCH, and even MATCH on its own — and they do not behave the same when your data shifts. Pick the wrong one and you ship a quietly broken model.
This guide walks through each function the way a working analyst actually uses them, not the way a textbook lists them. You will see when to reach for XLOOKUP, when VLOOKUP is still fine, and when INDEX MATCH beats both.
We will cover the gotchas — exact versus approximate match, the column index trap, #N/A errors, two-way lookups, and case sensitivity — and we will show how to test your formulas before they go into production. By the end you will know which function to use, why, and how to spot the failure modes before your manager does.
Lookup Functions at a Glance
Before we get into specific functions, it helps to think about what a lookup actually does. Every lookup needs three things: a value you are searching for, a place to search, and a result you want back. That is it. VLOOKUP, XLOOKUP, and INDEX MATCH all answer the same basic question — they just disagree on how to phrase it.
Once you internalise that, switching between them is mostly syntax, not strategy. The strategy comes from knowing your data: is the result column always to the right of the lookup column? Are duplicates possible? Will somebody add or delete columns next quarter?
A quick warning before you start typing. Lookups silently return the first match they find, so duplicate keys in your source data will produce results that look correct but are not. Always check that your lookup column contains unique values, or that you genuinely want the first hit. If you need every match, you are no longer doing a lookup — you are doing a filter, and FILTER or a pivot table is the better tool. Knowing where a lookup ends and a filter begins saves hours of debugging downstream.

The Six Lookup Functions You Will Actually Use
Vertical lookup. Searches the leftmost column of a range and returns a value from a column you specify to the right. Still the most common lookup in older workbooks.
Horizontal twin of VLOOKUP. Searches the top row and returns a value from a row below. Useful when your data is laid out across columns instead of down rows.
Modern replacement available in Microsoft 365 and Excel 2021. Looks left or right, handles errors natively, and defaults to exact match. The function to learn first if you have it.
Two functions used together. INDEX returns a value at a position; MATCH finds the position. Slightly more typing, but works in any direction and survives column insertions.
The original. Vector or array form. Mostly legacy now — useful for quirky approximate matches against sorted data but rarely the right first choice.
Returns the position of a value in a range. On its own it answers where rather than what, and it powers most INDEX MATCH and dynamic header formulas.
Let us start with VLOOKUP because it is still everywhere. The syntax is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]).
The first argument is what you are searching for, the second is the table you are searching, the third is which column number to return, and the fourth is FALSE for exact match or TRUE for approximate. The single most common bug in VLOOKUP is forgetting that fourth argument: omit it and Excel assumes TRUE, which silently returns wrong answers on unsorted data. Always write FALSE unless you specifically need a banded lookup like tax brackets.
The second VLOOKUP trap is the column index. If your formula says return column 4 and somebody inserts a new column at position 2, your formula still says 4 — but now it is pointing one column to the left of what you meant.
The result looks fine, the numbers look reasonable, and nobody notices for three weeks. INDEX MATCH and XLOOKUP avoid this because they reference the result column by name or range, not by number. If your workbook is shared or long-lived, that single difference is worth switching for.
XLOOKUP is the function Microsoft should have shipped twenty years ago. The syntax is =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). It defaults to exact match, it can look in any direction, it lets you specify what to return when nothing matches (no more wrapping in IFERROR), and it can search top-down or bottom-up. If you are on Microsoft 365 or Excel 2021, XLOOKUP should be your default lookup. The only reason to keep VLOOKUP is backwards compatibility with users still on Excel 2019 or earlier.
Syntax Side by Side
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Example: =VLOOKUP(A2, Products!A:D, 3, FALSE) finds the value in A2 within the Products sheet's column A and returns whatever sits in column C of that row. The FALSE forces exact match — never omit it unless you are doing a banded approximate lookup like tax brackets or grade boundaries.
INDEX MATCH deserves its own moment because for years it was the power user's answer to VLOOKUP's limitations. The combination works because each function does one small thing well. MATCH takes a value and a range and returns the position number — so =MATCH("London", A1:A100, 0) might return 47 if London sits on row 47.
INDEX takes a range and a position and returns the value — so =INDEX(B1:B100, 47) returns whatever is on row 47 of column B. Nest them and you have a lookup that can search any direction, ignores column inserts, and runs slightly faster than VLOOKUP on huge datasets.
Two-way INDEX MATCH MATCH is where the technique really shines. If you want to find the sales figure for a specific product in a specific quarter, you can write =INDEX(B2:E20, MATCH("WidgetA", A2:A20, 0), MATCH("Q3", B1:E1, 0)).
The first MATCH finds the row, the second MATCH finds the column, and INDEX delivers the cell at the intersection. No helper columns, no concatenated keys, no nested IFs. This is the formula that separates intermediate Excel users from genuinely fluent ones, and it shows up constantly on the Microsoft Excel Functions Questions and Answers 2 practice set.

The Approximate Match Trap
If you leave the last argument off VLOOKUP, Excel assumes TRUE — approximate match — and quietly returns the nearest value below your lookup, but only if your data is sorted ascending. On unsorted data it returns garbage that often looks correct. Always pass FALSE for exact match unless you genuinely need banded lookups. XLOOKUP defaults to exact match, which is one of the main reasons to switch.
Errors are where lookup functions earn their reputation for frustration. The most common is #N/A, which means the function searched and found nothing. That sounds simple, but #N/A can hide three different problems: the value genuinely is not there, the value is there but stored as text when you are searching for a number (or vice versa), or there are invisible spaces around the value.
The fix for the data-type mismatch is to wrap the lookup value or the lookup column in VALUE() or TEXT() so both sides agree. The fix for trailing spaces is TRIM() applied to both sides, or a one-off Find and Replace.
Other errors tell you something different. #REF! means your formula points at a range that no longer exists — usually because somebody deleted a column.
#NAME? means you misspelled the function or you are on a version of Excel that does not support it (XLOOKUP on Excel 2019 throws #NAME?). #VALUE! often means the column index is non-numeric or zero. The single best habit you can develop is wrapping every lookup in IFERROR or, better, using XLOOKUP's built-in if_not_found argument, so blank or unmatched cells return a readable message rather than littering your model with red errors.
If the column you want to return sits to the LEFT of the column you are searching, VLOOKUP will not work — full stop. Use XLOOKUP, INDEX MATCH, or rearrange your data. This single limitation is the most common reason analysts switch away from VLOOKUP, and it is a frequent exam question.
Performance starts to matter once your workbooks grow past a few thousand rows. VLOOKUP on a full-column reference like A:D is slower than VLOOKUP on a defined range A2:D5000, because Excel has to scan a million rows even if only five thousand have data.
INDEX MATCH is generally slightly faster than VLOOKUP at large scale because it only loads the columns it actually touches. XLOOKUP performance is comparable to INDEX MATCH. If you have a workbook that takes minutes to recalculate, swapping every full-column lookup for a defined range often cuts calculation time by half or more.
Approximate match deserves a special mention because it is one of the few cases where you actively want range_lookup set to TRUE. Tax brackets, commission tiers, shipping weight bands, grade boundaries — anywhere you have a sorted list of thresholds and you want to find which band a value falls into — approximate match is the right tool.
The data must be sorted ascending by the lookup column, and the function returns the largest value that is less than or equal to your lookup value. Get the sort wrong and the answer is wrong but plausible, which is the worst kind of bug.
Case sensitivity is the next gotcha. Standard VLOOKUP, XLOOKUP and MATCH all treat "PARIS" and "paris" as identical.
If you need case-sensitive lookups — common when matching codes that distinguish between upper and lower case letters — you have to build an array formula using EXACT, INDEX and MATCH, or use a helper column that concatenates the case-sensitive identifier with a marker. It is rare but it does come up, and it is the kind of detail that tests on the Microsoft Excel MCQ Questions and Answers 2 set love to throw at candidates.
Pre-Flight Checklist Before You Trust a Lookup
- ✓Confirm the lookup column contains unique values, or that you genuinely want the first match
- ✓Pass FALSE (VLOOKUP) or rely on XLOOKUP's default for exact match
- ✓Use absolute references on the table array so the formula survives copy-paste
- ✓Wrap in IFERROR or use XLOOKUP's if_not_found to handle missing values gracefully
- ✓Match data types — text searches text, numbers search numbers, no silent coercion
- ✓TRIM both sides if your source data came from a copy-paste or external system
- ✓Avoid full-column references on large workbooks for faster recalculation
- ✓Spot-check at least three results manually before signing off
Let us talk about wildcards, because they are the unsung heroes of partial-match lookups. Both VLOOKUP and XLOOKUP support wildcards, but XLOOKUP makes you opt in via the match_mode argument set to 2. The asterisk matches any number of characters, and the question mark matches exactly one. So =VLOOKUP("Smith*", A:B, 2, FALSE) finds the first row where column A starts with "Smith". This is hugely useful when your lookup values come from messy input — user-entered names, scraped text, exported reports — and you cannot rely on an exact match.
Wildcards have one significant downside: they only work on text. If your lookup column contains numbers, wildcards do nothing. The workaround is to convert the lookup column to text with TEXT() or by typing an apostrophe in front, which then lets you wildcard-match. Be aware that once converted to text, those numbers will not sort or sum correctly without conversion back. Plan your data types up front rather than fighting them in formulas.
Multi-criteria lookups are where most analysts hit a wall. The classic case: you want the price for a specific product in a specific region. VLOOKUP only takes one lookup value, so the traditional fix is a helper column that concatenates product and region into one key.
The modern fix in XLOOKUP is to concatenate inside the formula: =XLOOKUP(A2&B2, Products[Code]&Products[Region], Products[Price]). INDEX MATCH handles it with a similar concatenation trick. Or you can move to FILTER and SUMPRODUCT for genuine multi-condition logic. The right answer depends on how often the conditions change.

VLOOKUP vs XLOOKUP vs INDEX MATCH
- +XLOOKUP defaults to exact match — no silent approximate match disasters
- +XLOOKUP returns custom not-found messages without IFERROR wrapping
- +XLOOKUP and INDEX MATCH both work in any direction, left or right
- +INDEX MATCH survives column insertions because it references by range, not index
- +VLOOKUP is universally supported even in old Excel 2007 workbooks
- +INDEX MATCH is faster than VLOOKUP on very large datasets
- −VLOOKUP cannot look to the left — a hard structural limit
- −VLOOKUP breaks silently when columns are inserted between the lookup and return columns
- −XLOOKUP is not available in Excel 2019 or earlier — throws #NAME? on legacy files
- −INDEX MATCH requires nesting two functions, slightly harder to read at a glance
- −All three return only the first match — duplicates need FILTER or pivot tables
- −Approximate match requires sorted data and a FALSE switch most people forget
Dynamic arrays change the game once you are on Microsoft 365. XLOOKUP can return more than one value at a time if you pass a range as the return_array. So =XLOOKUP(A2, Products[Code], Products[[Name]:[Price]]) returns both the name and the price as a horizontal spilled array. This eliminates the need for two separate lookups, halves your formula count, and is fast. Combine that with FILTER for many-to-many lookups and SORT for ordered results, and most of what required complicated array formulas a few years ago is now a single function call.
Practice is the only thing that converts knowing the syntax into using it without thinking. Build a small dataset of your own — a hundred rows of mock product data is plenty — and rewrite the same lookup five different ways. Do it with VLOOKUP, XLOOKUP, INDEX MATCH, LOOKUP, and a manual filter. Time yourself. Break things deliberately by inserting columns, deleting rows, and pasting in trailing-space values. Then fix them. The intuition you build from that hour is worth more than reading any single tutorial, including this one.
One area that catches people out is using lookups across workbooks. A VLOOKUP that points at '[Pricing.xlsx]Sheet1'!A:D works fine while both files are open, but the moment the source workbook closes, certain functions stop refreshing and you can see stale values.
XLOOKUP and INDEX MATCH both handle external references slightly better, but the safer pattern for production models is to import the source data into the same workbook via Power Query and then run lookups against the local copy. That gives you a refresh button you can press, a clear audit trail, and no broken-link warnings when colleagues open the file.
Finally, a note on when not to use a lookup at all. If you find yourself nesting four IF statements inside a lookup, you have outgrown lookups and should switch to a pivot table, Power Query, or SUMIFS/COUNTIFS. If you are joining two tables by a shared key for analysis rather than a single result, Power Query's merge or a relationship in the data model is faster and more maintainable.
Lookups are point lookups — one value out, one value in. Once your problem grows beyond that, the right tool changes. Knowing when to stop reaching for VLOOKUP is itself an Excel skill, and one that comes up often when you work through the Microsoft Excel Formulas Questions and Answers 2 exercises.
If you are studying for an Excel certification or interview, lookup questions are guaranteed to appear. Examiners love them because they test both your knowledge of syntax and your ability to spot edge cases — exact versus approximate match, error handling, the leftmost-column rule, and case sensitivity.
Always test your lookup against three known values before relying on it in a model. One typo in a column index or a stray space in your data can silently return wrong answers for weeks.
Build a personal cheat sheet that pairs each function with its biggest gotcha. For VLOOKUP write "cannot look left, column index brittle". For XLOOKUP write "defaults to exact, version-locked". For INDEX MATCH write "two functions, survives column inserts". Three lines per function and you have a revision aid that fits on a sticky note.
Real-world Excel workbooks rarely use one lookup in isolation. A typical sales report might chain XLOOKUP for the customer name, another XLOOKUP for the product price, a SUMIFS for year-to-date totals, and an IFERROR wrapping the whole thing for clean presentation.
Reading other people's spreadsheets is one of the fastest ways to improve, because you see patterns and shortcuts you would not have invented on your own. Open any public finance template, click into the formulas, and trace what each function is doing. After ten or twenty templates the lookup vocabulary becomes second nature.
One last practical tip: name your ranges. Instead of pointing your XLOOKUP at Sheet1!$A$2:$A$5000, define that range as ProductCodes via the Name Manager and reference it by name.
Your formulas read like English (=XLOOKUP(A2, ProductCodes, ProductPrices)), they are easier to audit, and they break less often when somebody restructures the source sheet. Combine named ranges with structured Excel Tables (Ctrl+T) and your lookups will auto-expand when new rows are added — no more chasing dragged-down formulas across a quarter-end close. These small habits, more than any single function, separate fluent Excel users from people who merely know the syntax.
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.