VLOOKUP Partial Match in Google Sheets: How-To
In this article
To do a partial-match lookup in Google Sheets, you do not use VLOOKUP's fourth argument (that only switches exact vs. approximate). Instead you build a wildcard pattern and combine VLOOKUP with a helper column or with functions like SEARCH or REGEXMATCH. The simplest working method is to add a helper column that flags rows containing your search text, then use VLOOKUP on that flag. Below are the exact steps, plus the common traps and fixes.
What You'll Need
- A Google Sheet with your data in a table (one header row, no blank rows inside the data).
- A cell where you type the partial text you are searching for (for example, "acme" to find "Acme Corp").
- Basic familiarity with cell references and the formula bar.
Step-by-Step
- Set up a search cell. Pick an empty cell, say E1, and type the partial text you want to match. Keep it plain text, no asterisks or question marks unless you intend them as wildcards.
- Add a helper column to the right of your data. In the first data row (row 2 if row 1 is headers), enter a formula that checks whether the search text appears anywhere in the target column. For example, if your product names are in column A and your search text is in E1, put this in B2:
=IF(ISNUMBER(SEARCH($E$1,A2)),"match",""). SEARCH is case-insensitive; use FIND if you need case-sensitive matching. Copy the formula down the column. - Confirm the helper column shows "match" where expected. Scan a few rows. If nothing shows "match", your search text may have a leading space or the column reference may be wrong.
- Write the VLOOKUP against the helper column. In another empty cell, enter:
=VLOOKUP("match",B2:D100,3,FALSE). Here B2:D100 is the range starting at the helper column, 3 returns the third column of that range (column D), and FALSE forces an exact match on the word "match". Adjust the range and column number to your sheet. - Test with a different partial term. Change E1 to another fragment and confirm the VLOOKUP result updates. If it returns #N/A, no row contained that text.
- Optional: return the first matching row only. VLOOKUP stops at the first "match" it finds. If you need every match, use FILTER instead:
=FILTER(A2:D100,ISNUMBER(SEARCH(E1,A2:A100))). This spills all matching rows and is often the better choice for partial searches. - Optional: avoid the helper column entirely. Use an array formula with XLOOKUP or INDEX/MATCH and SEARCH. For example:
=XLOOKUP(TRUE,ISNUMBER(SEARCH(E1,A2:A100)),D2:D100,"not found"). This returns the value from column D for the first row where the search text appears in column A. XLOOKUP is available in current Google Sheets; if your sheet does not recognise it, use the helper-column method above.
Menu labels and function availability can differ slightly by account type, region, or whether your sheet is set to a specific locale. The formulas above work in the standard web version of Google Sheets.
Common Mistakes
- Using VLOOKUP's approximate match (TRUE) for partial text. That argument matches on sorted ranges, not substrings. It will return wrong rows silently. Always use FALSE with a helper flag or switch to SEARCH/FILTER.
- Forgetting the dollar signs. If you copy
SEARCH($E$1,A2)down without locking E1, the search cell shifts and results break. - Searching a column that contains numbers. SEARCH converts numbers to text, but leading zeros or formatted numbers can behave unexpectedly. Format the column as plain text if you see odd results.
- Leaving blank rows inside the range. VLOOKUP and FILTER can stop early or return errors. Remove blank rows or use a range that ends at the last data row.
- Expecting VLOOKUP to return multiple matches. It returns only the first. Use FILTER when you need all matches.
- Typing wildcards into the search cell by accident. An asterisk in E1 is treated as a wildcard by some functions. If you need a literal asterisk, escape it or use FIND with a fixed string.
Tips
- Use
TRIM()around your search cell to strip accidental spaces:SEARCH(TRIM($E$1),A2). - SEARCH is case-insensitive; FIND is case-sensitive. Pick based on whether "Acme" and "acme" should match.
- If your data is large, put the helper column on a separate tab or far-right column so it does not interfere with sorting and filtering.
- For a cleaner sheet, wrap the helper formula in
IFERRORto hide errors:=IFERROR(IF(ISNUMBER(SEARCH($E$1,A2)),"match",""),""). - When you need the row number rather than a value, use
MATCH(TRUE,ISNUMBER(SEARCH(E1,A2:A100)),0)to get the position of the first match.
Troubleshooting
VLOOKUP returns #N/A even though the text is there. Check the helper column actually shows "match" for that row. If it does not, the SEARCH formula is probably referencing the wrong column or the search cell has a stray space. Test SEARCH on its own in a blank cell.
The result is the wrong row. VLOOKUP returns the first match in the range, not the best match. If multiple rows contain the text, reorder your data or use FILTER to see all candidates.
You get #REF! or #VALUE!. The column index number is larger than the range width, or a cell contains an error. Widen the range or wrap the formula in IFERROR to see a clean message.
XLOOKUP is not recognised. Your sheet may be in an older locale or the function may not be enabled for your account. Fall back to the helper-column VLOOKUP method, which works everywhere.
SEARCH finds nothing for numbers. Convert the target column to text first (Format > Number > Plain text) or use TO_TEXT(A2) inside the SEARCH.
If that did not work, rebuild the formula one piece at a time: first confirm SEARCH returns a number, then confirm ISNUMBER returns TRUE, then confirm the helper column shows "match", and only then add VLOOKUP. This isolates which part is failing.
Frequently Asked Questions
Can VLOOKUP do a partial match on its own?
No. VLOOKUP's fourth argument only chooses exact or approximate matching on sorted data. For substring matching you need a helper column with SEARCH or a different function like FILTER or XLOOKUP.
Is SEARCH case-sensitive?
No. SEARCH ignores case. Use FIND if you need case-sensitive partial matching.
How do I return all rows that contain the text?
Use FILTER with ISNUMBER and SEARCH, for example =FILTER(A2:D100,ISNUMBER(SEARCH(E1,A2:A100))). It spills every matching row into adjacent cells.
Why does my VLOOKUP return the same row every time?
Because VLOOKUP stops at the first "match" in the helper column. If your search text is too broad, many rows match and the first one always wins. Narrow the search term or switch to FILTER.
Can I use wildcards with VLOOKUP in Google Sheets?
Yes, when the lookup value itself contains * or ? and you use exact match (FALSE). For example, VLOOKUP("Acme*",A2:D100,3,FALSE) can match "Acme Corp". This works for simple patterns but not for arbitrary substrings in the middle of text; use SEARCH for that.
Does this work on the Google Sheets mobile app?
The formulas work the same, but editing long formulas on a phone is awkward. Build and test on desktop, then open the sheet on mobile to view results.