Yes, you can look up more than one value with VLOOKUP, but the classic function only returns a single match. To retrieve multiple values, you combine VLOOKUP with helper columns, use array formulas, or switch to newer functions like FILTER or XLOOKUP. The best method depends on your Excel version and whether you want all matches or just the first few.
Why VLOOKUP Stops at the First Match
VLOOKUP searches the first column of a table and returns a value from a column you specify, but it always stops at the first exact match it finds. If your lookup column contains duplicate keys, VLOOKUP will only give you the first row—it has no built-in way to continue searching. This is a common frustration when working with order lists, customer transactions, or any dataset where the same ID appears multiple times.
For example, with sales data where customer ID 1001 appears in rows 2, 7, and 15, a standard =VLOOKUP(1001, A2:C20, 3, FALSE) will always return the amount from row 2, ignoring the other two. To get all three amounts, you need a different approach.
Method 1: Helper Column with COUNTIF
The classic workaround adds a helper column that turns duplicate keys into unique ones. This works in every Excel version and is easy to understand.
- Insert a new column to the left of your data (say column A becomes the helper, and your original key moves to column B).
- In A2, enter:
=B2&"-"&COUNTIF($B$2:B2,B2)and drag down. This creates keys like “1001-1”, “1001-2”, “1001-3”. - Now use VLOOKUP with a similar constructed lookup value. In your result cell, enter:
=VLOOKUP("1001-"&ROW(A1), A2:C20, 3, FALSE)and drag down. ROW(A1) becomes 1, then 2, then 3, pulling each successive match.
This method is reliable but requires modifying your source data. If you cannot add columns, use the array formula approach instead.
Method 2: Array Formula with INDEX and SMALL
For a non-helper solution, combine INDEX, SMALL, and IF in an array formula. This returns all matching values without changing your data layout.
Assume your lookup value is in E1, data in A2:A20 (keys) and B2:B20 (values). Enter this formula and press Ctrl+Shift+Enter (or just Enter in Excel 365):
=IFERROR(INDEX($B$2:$B$20, SMALL(IF($A$2:$A$20=$E$1, ROW($A$2:$A$20)-ROW($A$2)+1), ROW(A1))), "")
Drag down. The IF part creates an array of row positions where the key matches, SMALL picks the nth smallest position, and INDEX returns the corresponding value. IFERROR shows a blank when you run out of matches. In Excel 365, this works as a dynamic array without Ctrl+Shift+Enter.
Method 3: FILTER Function (Excel 365 and 2021)
If you have Excel 365 or Excel 2021, the FILTER function is the cleanest way to get all matching values. It spills results automatically into multiple cells.
With your lookup value in E1 and data in A2:A20 (keys) and B2:B20 (values), enter:
=FILTER(B2:B20, A2:A20=E1, "No matches")
This returns a vertical array of every value in B where the corresponding A equals E1. To get multiple columns (for example, amount and date), use: =FILTER(B2:C20, A2:A20=E1). The function requires no helper columns and updates automatically if your data changes.
Method 4: XLOOKUP with Multiple Results
XLOOKUP itself still returns only one match, but you can pair it with a running count trick. Create a second column that counts occurrences, then use XLOOKUP on that combined key.
Add a helper column C with: =A2&"-"&COUNTIF($A$2:A2,A2). Then in your result area, enter: =XLOOKUP($E$1&"-"&ROW(A1), $C$2:$C$20, $B$2:$B$20, "") and drag down. This works similarly to Method 1 but uses XLOOKUP’s simpler syntax and does not require the lookup column to be first.
How to Choose the Right Method
- Excel 365 or 2021: Use FILTER. It is the simplest, most readable, and spills results automatically.
- Older Excel (2019 and earlier): Use the INDEX/SMALL array formula if you cannot add helper columns.
- When you need to keep the source data untouched: Use the array formula or FILTER; helper columns modify your sheet.
- When you want to return values from multiple columns: FILTER handles this natively; with helper methods you need separate formulas.
- When your data is in a table that may grow: Use structured references with FILTER or dynamic array formulas that expand automatically.
Common Problems and Pitfalls
Array formulas in older Excel require Ctrl+Shift+Enter; if you forget, you get a #VALUE! error. Helper columns break if you sort your data after creating them—the COUNTIF ranges become misaligned. Also, if your lookup values are numbers stored as text, VLOOKUP will fail; use =TEXT(A2,"0") in the helper to normalize. For case-sensitive lookups, none of these methods work directly—use INDEX with MATCH and EXACT instead.
Frequently Asked Questions
Can I use VLOOKUP to return all matches in one cell? Yes, but you need TEXTJOIN with an array formula. In Excel 365, enter =TEXTJOIN(", ", TRUE, FILTER(B2:B20, A2:A20=E1)) to get all values separated by commas in a single cell.
Does FILTER work in Excel 2019? No, FILTER requires Excel 365 or Excel 2021. In Excel 2019, use the INDEX/SMALL array formula with Ctrl+Shift+Enter.
Why does my VLOOKUP return #N/A even though the value exists? Check for extra spaces, number stored as text, or the lookup column not being the leftmost column. Use =TRIM(A2) to clean data, and ensure your table range starts with the lookup column.
Can I look up multiple values without a helper column in Google Sheets? Yes, Google Sheets has a FILTER function that works the same way. Use =FILTER(B2:B20, A2:A20=E1) directly in a cell.
What is the fastest method for 100,000 rows? FILTER and XLOOKUP are optimized for large data. The INDEX/SMALL array formula can slow down on big datasets because it recalculates the array for each dragged cell. Consider using a PivotTable if you need summaries rather than raw matches.
Alternatives to VLOOKUP for Multiple Values
Beyond the methods above, consider using a PivotTable to list all values for a given key, or Power Query to group and expand data. For simple cases, you can also use a database function like DGET, but it only returns one value. The modern approach is to learn FILTER and dynamic arrays, as they replace most VLOOKUP workarounds entirely.
Related
- How to Convert Data to a Range in Excel
- How to Export File Explorer Pins from Windows
- Solar Battery Runtime Calculator: How to Use One
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel TEXT Function for Dates: Formats and ExamplesTo turn an Excel date into formatted text, use =TEXT(A2,"mmmm d, yyyy"), assuming A2 contains a real date;…
- Excel SUBSTITUTE Double Quote: Formulas and ExamplesTo remove straight double quotation marks from a cell in Excel, use =SUBSTITUTE(A2,CHAR(34),"") when the text is in…
- Excel FV Compound Interest: Formula, Examples, and TipsIn Excel, use the FV function to calculate a value in the future after interest compounds: =FV(rate,nper,pmt,[pv],[type]). For…
- Using Transpose in Excel: Methods, Formulas, and TipsTo transpose data in Excel, copy the cells, select the destination, and choose Home > Paste > Transpose.…
- How to Sort in Alphabetical Order in ExcelTo sort a list alphabetically in Excel for Microsoft 365 on Windows, click a cell in the text…
- Formula to Lowercase in Excel: LOWER ExplainedThe direct answer is the LOWER function: =LOWER(A1) converts the text in cell A1 to all lowercase. For…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.