SEARCH function
Returns the position of one text inside another, ignoring case and allowing wildcards (* and ?).
Available in All versions of Excel, including Microsoft 365, Excel for Mac and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
SEARCH(find_text, within_text, [start_num])| Argument | What it means | |
|---|---|---|
find_text | Required | The text to look for. May contain ? (any one character) and * (any characters); put ~ before them to search for the literal character. |
within_text | Required | The text or cell to search in. |
start_num | Optional | Character position to start from. Default 1. |
Returns: A number: the position of the first character of the match.
How SEARCH works
SEARCH works like FIND - it returns the position where some text starts - but it is more forgiving: it ignores upper and lower case and understands wildcards. =SEARCH("sale","Summer SALE 2026") returns 8 even though the cell says SALE in capitals.
The most common use is not the position itself but the test "does this cell contain...?": ISNUMBER(SEARCH("refund",A2)) is TRUE when the word appears anywhere, in any case. That pattern powers keyword categorisation of support tickets, bank transactions or product names, often inside IF or FILTER.
Wildcards: ? stands for any single character and * for any number of characters, so "b?g" matches bag, big and BUG. To look for an actual question mark or asterisk, put a tilde in front: "~?". When nothing is found SEARCH returns #VALUE!.
Examples
1Position ignoring case
| A | B | |
|---|---|---|
| 1 | Campaign | |
| 2 | Summer SALE 2026 | 8 |
Result: 8
sale matches SALE, which starts at character 8. FIND would return an error here.
2Categorise support tickets
| A | B | |
|---|---|---|
| 1 | Ticket | |
| 2 | Customer asks for a REFUND | Refund |
Result: Refund
SEARCH returns a number (21), so ISNUMBER is TRUE and the ticket is tagged. If the word were missing, SEARCH's error would make ISNUMBER FALSE.
3Wildcard: any one character
| A | B | |
|---|---|---|
| 1 | Item | |
| 2 | Large Bag, red | 7 |
Result: 7
b?g matches Bag (any letter in the middle, any case), which starts at position 7.
4Find a real question mark
| A | B | |
|---|---|---|
| 1 | Note | |
| 2 | Ready? Go | 6 |
Result: 6
The tilde makes ? literal instead of a wildcard. The question mark is the 6th character.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The text was not found, or start_num is less than 1 or larger than the text length. | Wrap in IFERROR or use ISNUMBER(SEARCH(...)) for a TRUE/FALSE result. |
Tips
- Searching for several keywords at once:
=SUM(--ISNUMBER(SEARCH({"refund","return"},A2)))>0. - Short keywords match inside longer words:
SEARCH("art","Smart TV")finds a match. Add spaces around the word or use REGEXTEST with\bword boundaries for whole words. - COUNTIF with wildcards (
"*refund*") counts matching cells directly without SEARCH.
Questions
How do I check if a cell contains a word?
=ISNUMBER(SEARCH("word",A2)) returns TRUE if the word appears anywhere, ignoring case.
Is SEARCH case-sensitive?
No. Use FIND when upper and lower case must match exactly.
How do I search for an asterisk or question mark?
Put a tilde in front of it: SEARCH("~*",A2) finds a literal asterisk.
Google Sheets
SEARCH also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
SEARCH in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | HLEDAT |
| Danish | SØG |
| Dutch | VIND.SPEC |
| Finnish | KÄY.LÄPI |
| French | CHERCHE |
| German | SUCHEN |
| Hungarian | SZÖVEG.KERES |
| Italian | RICERCA |
| Norwegian (Bokmål) | SØK |
| Polish | SZUKAJ.TEKST |
| Portuguese (Brazil) | LOCALIZAR |
| Portuguese (Portugal) | PROCURAR |
| Russian | ПОИСК |
| Spanish | HALLAR |
| Swedish | SÖK |
| Turkish | MBUL |
Recipes that use SEARCH
- How to check if a cell contains a word in Excel
- How to count cells that contain text in Excel
- How to extract text between two characters in Excel
- How to use conditional formatting with a formula in Excel