
Returns the position of one text string inside another. SEARCH ignores case and supports wildcards.
The Excel SEARCH function returns the position of one text string inside another. It is similar to FIND, but SEARCH ignores case and supports wildcards. For example, =SEARCH("e","EXCEL") returns 1 even though the text contains uppercase E.
SEARCH is useful when you need a flexible text search. It works well with user-entered text, mixed capitalization, and simple wildcard patterns such as * and ?.
Returns the starting position of a match while ignoring uppercase and lowercase differences.
Returns a whole number. If no match is found, SEARCH returns #VALUE!.
=SEARCH(find_text, within_text, [start_num])
find_text is what you want to search for. within_text is the text to search inside. start_num is optional and tells Excel where the search should begin.
*, ?, and ~ as wildcard syntax.SEARCH and FIND are close relatives. The main difference is that SEARCH ignores case and FIND does not. SEARCH also supports wildcards, while FIND does not.
| Function | Case-Sensitive? | Wildcards? | Use When |
|---|---|---|---|
SEARCH |
No | Yes | You want a flexible search |
FIND |
Yes | No | You need exact case-sensitive matching |
ISNUMBER |
- | - | You want a safe TRUE/FALSE check from SEARCH |
SEARCH is often used to check whether a word or pattern appears in a cell. Because it ignores case, it works well when different users may type the same word in different ways.
SEARCH is also useful inside larger text formulas. The position it returns can be passed into LEFT, MID, or RIGHT to split text around a delimiter.
This example shows the main difference from FIND. SEARCH treats uppercase and lowercase letters as the same, so it can find "e" inside "EXCEL".
=SEARCH("e", "EXCEL") // 1
=SEARCH("e", "excel") // 1
=FIND("e", "EXCEL") // #VALUE!
In cell F1, use SEARCH to find "e" in A2 ("EXCEL"). SEARCH ignores case, so it will find the position even though A2 is uppercase.
SEARCH supports three wildcard rules. * matches any number of characters, ? matches one character, and ~ escapes a wildcard so it is treated literally.
=SEARCH("ex*l", "excellent") // 1
=SEARCH("t?st", "test case") // 1
In cell F2, use SEARCH to find the pattern "ex*l" in A3 ("excellent"). The asterisk matches any characters in between.
SEARCH returns an error if no match is found. Wrapping it in ISNUMBER turns that result into a simple TRUE or FALSE check, which is often easier to use in filtering and logic formulas.
=ISNUMBER(SEARCH("Gold", A4))
// "GOLD-Member" -> TRUE
In cell F3, use ISNUMBER(SEARCH("Gold", A4)) to safely check if "Gold" appears in A4 without getting an error if it is missing.
The position returned by SEARCH can feed into another text function. Here it helps measure the length of the text before the hyphen so another formula, such as LEFT, can use that result.
=SEARCH("-", A2)-1
// "EC-Global" -> 2
=LEFT(A2, SEARCH("-",A2)-1) // "EC"
In cell F4, use SEARCH to find the hyphen in A2 ("EC-Global"), then subtract 1 to get the length of the prefix.
Wildcard searches can match more broadly than you expect, so it is a good idea to test the pattern on sample data before applying it across a full column.
SEARCH returns the position of text inside another text string.=SEARCH(find_text, within_text, [start_num]).Tell your friends about this post