Match on part of a value — “starts with,” “contains” — using wildcards. * stands for any characters and ? for a single one, in VLOOKUP or XLOOKUP.
* wildcards matches it anywhere in the lookup value. FALSE keeps it an exact (wildcard) match.
The example
Search “ace” and match “Acme Inc”.
| A | B | |
|---|---|---|
| 1 | Search | Match |
| 2 | acme | Acme Inc — $4,200 |
The formula
Wrap the term in wildcards:
How it works
Wildcards turn a lookup into a pattern match:
*matches any run of characters;?matches exactly one.- Concatenate them around the term:
"*"&E2&"*"= “contains”;E2&"*"= “starts with.” - Keep the match type FALSE (VLOOKUP) or match mode 2 (XLOOKUP) to enable wildcards.
- It returns the first wildcard match — order your data so the intended hit comes first.
XLOOKUP wildcards need match mode 2: =XLOOKUP("*"&E2&"*", names, vals, , 2). To match a literal * or ?, precede it with a tilde (~*).
Try it: interactive demo
Type part of a company name.
Variations
Starts with
Wildcard only after:
XLOOKUP wildcard
Match mode 2:
Single character
? matches one char:
Pitfalls & errors
Wildcards need exact mode. Use FALSE in VLOOKUP or match mode 2 in XLOOKUP — approximate mode ignores wildcards.
First match only. A wildcard can match many rows; you get the first. Narrow the term or sort the data.
Literal * or ?. Escape with a tilde (~*) to match the actual character.
Practice workbook
Frequently asked questions
How do I do a partial-match lookup in Excel?
How do I match values that start with a term?
How do wildcards work with XLOOKUP?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class