Site icon Best Excel Tutorial

Excel VLOOKUP Wildcards: Partial Matching with Asterisk, Question Mark and Tilde

VLOOKUP supports wildcards for powerful partial-matching: use the asterisk (*) for “any number of characters”, the question mark (?) for “exactly one character”, and the tilde (~) to treat wildcards literally, enabling flexible lookups when exact keys don’t exist or vary in format.

Wildcard cheatsheet

Core patterns with formulas

Step-by-step examples

1) Partial product name (contains)

Scenario: Return price where Product column contains the term in H2.
Formula: =VLOOKUP(“*”&H2&”*”, $A$2:$B$200, 2, FALSE)
Why: Concatenate wildcards around the search term to match anywhere in the text.

2) Starts-with search for names

Scenario: Names column A has “John Carter”, “Johnny Appleseed”, etc.
Formula: =VLOOKUP(H2&”*”, $A$2:$C$200, 3, FALSE)
Why: A trailing asterisk matches any suffix after the prefix.

3) Fixed pattern codes with one unknown

Scenario: Item codes like X1A, X2A, X3B; vary at the middle digit/letter.
Formula: =VLOOKUP(“X?A”, $A$2:$B$200, 2, FALSE)
Why: Question mark replaces exactly one character.

4) Literal wildcard in text

Scenario: Labels like “Price*Discount”.
Formula: =VLOOKUP(“Price~*Discount”, $A$2:$B$200, 2, FALSE)
Why: Tilde escapes the asterisk so it’s treated literally.

Common pitfalls and fixes

When to use INDEX/MATCH or XLOOKUP instead

Return from a column to the left or dynamic column positions:

Performance and scaling

Troubleshooting checklist

Exit mobile version