The direct answer: VLOOKUP alone returns only the first match, so to get multiple results you must combine it with helper columns, array formulas, or newer functions like FILTER. The cleanest modern solution is =FILTER(range, condition) in Excel 365, which spills all matches automatically.
Why VLOOKUP Stops at the First Match
VLOOKUP is designed to find one value in the leftmost column of a table and return a value from a column to the right. When duplicate lookup values exist, it always returns the first occurrence it encounters, scanning top to bottom. This behavior is hardcoded—there is no built-in argument to change it. For example, if you have a list of orders with customer names in column A and you look up “Smith”, you get only the first Smith order, not all of them.
This limitation drives people to seek workarounds. The good news: there are several reliable methods, each with different trade-offs in complexity, version compatibility, and performance.
Method 1: FILTER Function (Excel 365 and Excel 2021)
If you have Microsoft 365 or Excel 2021, the FILTER function is the simplest and most powerful solution. It returns an array of all matching values directly.
Suppose you have customer names in A2:A20 and order amounts in B2:B20. To get all amounts for “Smith”:
=FILTER(B2:B20, A2:A20="Smith")
This spills the results down automatically. If no matches exist, it returns a #CALC! error. To handle that gracefully, use the optional third argument:
=FILTER(B2:B20, A2:A20="Smith", "No orders")
FILTER also works with multiple conditions. To get orders for Smith in the West region (C2:C20):
=FILTER(B2:B20, (A2:A20="Smith")*(C2:C20="West"))
Note: FILTER is not available in Excel 2019 or earlier. On Mac, it works the same as Windows in Excel 365.
Method 2: INDEX-MATCH with Array Formula (Legacy)
For older Excel versions without FILTER, you can use an array formula that combines INDEX, SMALL, and IF. This is the classic approach taught for years.
Assume lookup values in A2:A20, return values in B2:B20. In D2, enter the lookup name (e.g., “Smith”). In E2, enter this array formula (confirm with Ctrl+Shift+Enter in older Excel; in Excel 365 it works normally):
=IFERROR(INDEX($B$2:$B$20, SMALL(IF($A$2:$A$20=$D$2, ROW($A$2:$A$20)-ROW($A$2)+1), ROW()-ROW($E$2)+1)), "")
Drag down to copy. The formula counts matches and returns the nth one. It uses SMALL to get the k-th smallest row number of matches, then INDEX to pull the corresponding value. The IFERROR returns an empty string when you run out of matches.
This formula is harder to read and maintain, but it works in Excel 2010 and later. On Mac, array formulas require Cmd+Shift+Enter in older versions; in Excel 365, just press Enter.
Method 3: Helper Column with COUNTIF
A helper column is the most transparent way to make VLOOKUP work for multiple matches. You add a column that creates a unique key for each occurrence of a lookup value.
Steps:
- Insert a new column A (or any empty column) to the left of your data.
- In A2, enter:
=B2&COUNTIF($B$2:B2,B2)(assuming original lookup values are in B). - Copy down. This creates keys like “Smith1”, “Smith2”, etc.
- Now use VLOOKUP with a concatenated lookup value:
=VLOOKUP("Smith"&ROW()-1, $A$2:$C$20, 3, FALSE)where ROW()-1 gives 1,2,3 as you drag.
For example, if you put the lookup name in E2 and want results in F2, F3, etc., use: =VLOOKUP($E$2&ROW()-1, $A$2:$C$20, 3, FALSE) and drag down. The COUNTIF part increments the occurrence number.
This method is easy to audit and works in any Excel version, but it modifies your data layout and requires a helper column.
Method 4: Using UNIQUE and FILTER to List Distinct Matches
Sometimes you want a list of unique matching items rather than all duplicates. Combine UNIQUE with FILTER. For example, to list all distinct products purchased by “Smith” from a list in A2:A20 (customers) and B2:B20 (products):
=UNIQUE(FILTER(B2:B20, A2:A20="Smith"))
This returns each product once. UNIQUE requires Excel 365 or Excel 2021. It is not available in older versions.
Common Problems and Mistakes
Several pitfalls trip up users:
- Exact vs. approximate match: Always use FALSE (or 0) as the last argument in VLOOKUP to force exact matching; TRUE (1) gives approximate matches and may return wrong results.
- Array formula not entered correctly: In Excel 2019 and earlier, forgetting Ctrl+Shift+Enter causes #VALUE! errors.
- Spilled results overlap: With FILTER, ensure the cells below the formula are empty; otherwise you get a #SPILL! error.
- Case sensitivity: VLOOKUP and FILTER are case-insensitive by default. If you need case-sensitive matching, use EXACT in an array formula or a helper column.
- Drag down with relative references: In the INDEX-MATCH array formula, forgetting to lock ranges with $ breaks the formula when copied.
Choosing the Right Method for Your Version
Your choice hinges on your Excel version and data size.
- Excel 365 / 2021: Use FILTER. It is simplest, dynamic, and recalculates automatically.
- Excel 2019 and earlier: Use the helper column method for clarity, or the array formula for a no-helper approach.
- Large datasets (tens of thousands of rows): FILTER is efficient, but array formulas can slow down. Helper columns with COUNTIF are also fast.
- If you need to return multiple columns: FILTER can return an entire array:
=FILTER(A2:C20, A2:A20="Smith")returns all rows for Smith.
Frequently Asked Questions
Can VLOOKUP return all matches without a helper column? Not directly. VLOOKUP’s design only returns the first match. You must use array formulas or FILTER to get all matches.
Why does my FILTER formula return #SPILL!? This error means something is blocking the spilled results. Clear any non-empty cells in the range where the results would appear, or move the formula to a location with empty cells below.
How do I get multiple matches with XLOOKUP? XLOOKUP also returns only the first match by default. However, you can set the optional ‘match_mode’ to 2 (wildcard) or use it with FILTER. For multiple matches, FILTER is still the recommended function.
Can I use VLOOKUP to return multiple matches in Google Sheets? Google Sheets has a different approach: use FILTER or QUERY. For example, =FILTER(B2:B20, A2:A20="Smith") works identically in Google Sheets.
Is there a way to return multiple matches with a pivot table? Yes, a pivot table can summarize duplicate values, but it aggregates (sums, counts) rather than listing raw matches. For a list, use FILTER or array formulas.
What if I need to return multiple matches from a different sheet? Reference the sheet normally: =FILTER(Sheet2!B2:B20, Sheet2!A2:A20="Smith"). The same syntax applies for other methods.
Related
- Dictionaries Python 3 Update: What Changed and How to Use It
- Google Sheets Count Rows: 6 Ways to Do It
- Fed Reserve Balance Sheet: How It Works
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel TRIM Formula Examples for Cleaning Messy TextIn Excel for Microsoft 365, use =TRIM(A2) to remove leading and trailing ordinary spaces from the text in…
- Excel Sum Based on Filter: Formulas for Visible RowsTo sum only the rows currently visible after filtering in Excel, use SUBTOTAL. With values in B2:B100, enter…
- Oracle RIGHT Function: How to Get Trailing CharactersOracle Database does not provide a built-in RIGHT() string function. To return the last characters of a string,…
- Formula to Capitalize Each Word in ExcelIn Excel, use the PROPER function to capitalize the first letter of each word: with the text to…
- Excel Formula for the Lower of Two Values in Two CellsTo return the lower of two values in Excel, use =MIN(A2,B2). If the values are in cells A2…
- Excel Named Range vs Table: How to Choose the Right ToolAn Excel named range gives a cell or formula a memorable name; an Excel table organizes related records…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.