To look up multiple values with VLOOKUP in Google Sheets, you cannot use a single VLOOKUP formula because VLOOKUP returns only the first match. Instead, you combine VLOOKUP with helper columns, array formulas, or functions like FILTER, INDEX/MATCH, or TEXTJOIN to retrieve all matching results. The most reliable method is to use FILTER for multiple matches, or to create a unique identifier column and use VLOOKUP with ARRAYFORMULA for multiple criteria. This guide shows you step-by-step how to achieve both, along with common pitfalls and troubleshooting tips.
What You'll Need
- A Google account and access to Google Sheets.
- Your data organized in a spreadsheet with at least two columns: one for the lookup key and one for the value to return.
- Basic familiarity with spreadsheet formulas and cell references.
Step-by-Step
- Understand the limitation: VLOOKUP searches for a value in the first column of a range and returns a value from a specified column in the same row. It stops at the first match, so it cannot return multiple values for the same lookup key on its own.
- Choose your approach: Decide whether you need to return multiple values for a single lookup key (e.g., all orders for one customer) or perform a lookup based on multiple criteria (e.g., find a price for a specific product and size). The methods differ.
- For multiple values from one key, use FILTER: Suppose your data is in A2:B10, with keys in column A and values in column B. To get all values for the key in D2, enter
=FILTER(B2:B10, A2:A10 = D2). This spills all matching values into adjacent cells. If no match, it returns #N/A; wrap with IFERROR to handle that. - For multiple criteria with VLOOKUP, create a helper column: Insert a new column at the left of your data (e.g., column A). In A2, enter
=B2&C2(assuming B is criteria1 and C is criteria2). Drag down. This concatenates the criteria into a unique key. - Use VLOOKUP with the helper column: In your lookup cell, enter
=VLOOKUP(D2&E2, A2:D10, 4, FALSE)where D2 and E2 are the criteria you're searching for, and column 4 is the value to return. Adjust the range and column index as needed. - Alternatively, use INDEX/MATCH with multiple criteria: Enter
=INDEX(D2:D10, MATCH(1, (B2:B10=D2)*(C2:C10=E2), 0))as an array formula (press Ctrl+Shift+Enter in some versions, but in Google Sheets it works directly). This avoids helper columns but can be slower on large datasets. - For returning multiple values with VLOOKUP-like behavior, use TEXTJOIN with FILTER: To combine all matches into one cell, use
=TEXTJOIN(", ", TRUE, FILTER(B2:B10, A2:A10 = D2)). This gives a comma-separated list of all matching values. - Test and adjust: Verify your formulas return expected results. Check for errors like #N/A (no match) or #REF! (range issues). Use absolute references (e.g., $A$2:$B$10) if you plan to copy formulas.
Common Mistakes
- Using VLOOKUP alone for multiple matches: VLOOKUP only returns the first match; it cannot return all matches. Always use FILTER or helper columns for multiple values.
- Forgetting to set the range_lookup argument to FALSE: VLOOKUP's fourth argument should be FALSE (or 0) for exact matches. Omitting it or using TRUE can give wrong results.
- Not locking ranges: When copying formulas, relative references shift and cause errors. Use absolute references (e.g., $A$2:$B$10) for the lookup range.
- Helper column concatenation issues: Ensure the concatenated key in the helper column matches exactly the concatenation of your lookup criteria, including spaces or separators.
- Ignoring error handling: Wrap formulas with IFERROR to display a friendly message instead of #N/A when no match is found.
Tips
- Use named ranges to make formulas easier to read and maintain.
- For large datasets, FILTER is generally faster and more efficient than array formulas with INDEX/MATCH.
- If you need to return multiple values vertically, FILTER spills automatically; ensure there are enough empty cells below to avoid #REF! errors.
- Combine FILTER with SORT or UNIQUE to organize results.
- When using helper columns, place them in a separate sheet or hide them to keep your main sheet clean.
Troubleshooting
- Formula returns #N/A: Check that the lookup value exists in the range. Ensure there are no leading/trailing spaces. Use TRIM to clean data.
- FILTER returns #REF!: This happens when there isn't enough space for the results to spill. Clear cells below or move the formula.
- VLOOKUP returns wrong value: Verify the column index number is correct (count from the first column of the range). Also check that the range is correct and the key column is the first column.
- Helper column not matching: Ensure the concatenation order and separators match exactly between the helper column and your lookup criteria.
- Performance issues: Large arrays with INDEX/MATCH can slow down your sheet. Consider using FILTER or helper columns instead.
Frequently Asked Questions
Can VLOOKUP return multiple values in one cell?
No, VLOOKUP returns a single value. To combine multiple values into one cell, use TEXTJOIN with FILTER.
How do I look up multiple criteria with VLOOKUP?
Create a helper column that concatenates the criteria, then use VLOOKUP on that concatenated key.
What is the alternative to VLOOKUP for multiple matches?
Use the FILTER function, which returns all matching rows. It's more powerful and doesn't require helper columns.
Why does my VLOOKUP return the same value for different lookups?
You likely have the range_lookup argument set to TRUE (approximate match) or the range is not locked with absolute references. Set it to FALSE and use $ signs.
Can I use VLOOKUP with multiple sheets?
Yes, you can reference another sheet in the range, e.g., VLOOKUP(A2, Sheet2!$A$2:$B$10, 2, FALSE). Just ensure the sheet name is correct.
How do I handle errors when no match is found?
Wrap your formula with IFERROR, e.g., =IFERROR(VLOOKUP(...), "Not found").