Text
SEARCH Function in Excel
Finds one text string within another and returns the starting position (case-insensitive, supports wildcards).
Syntax
- =SEARCH(find_text, within_text, [start_num])
Arguments
- find_text (required): Text to find (can include wildcards)
- within_text (required): Text to search in
- start_num (optional): Position to start searching (default 1)
Examples
- =SEARCH("apple", "Apple Pie") - Case-insensitive search - Result: 1
- =SEARCH("p?e", "Apple Pie") - Wildcard search - Result: 3
Text cleanup before SEARCH
- Run [TRIM](/functions/trim/) and [CLEAN](/functions/clean/) on imported keys before lookups.
- Join or split text before analysis — see [TEXTJOIN](/functions/textjoin/) and [TEXTSPLIT](/functions/textsplit/).
- Guide: [Excel text functions](/guides/excel-text-functions-guide/).
Common errors
- #VALUE! if text not found
- Wildcards: * = any chars, ? = single char
Use cases
- Case-insensitive matching
- Pattern matching
- Text extraction
Frequently asked questions
- When should I use SEARCH vs FIND? Use SEARCH for case-insensitive matching or wildcards. Use FIND for exact, case-sensitive matching. SEARCH("ABC","abc")=1, FIND("ABC","abc")=#VALUE!.
- How do wildcards work in SEARCH? * matches any sequence of characters, ? matches exactly one character. =SEARCH("p*e", "Apple") finds 'pple' (p...e pattern). =SEARCH("p?e", "Apple") finds 'ple'.
- How do I search for literal * or ? Use tilde (~) to escape: =SEARCH("~*", A1) finds literal asterisk. =SEARCH("~?", A1) finds literal question mark.
- How do I check if text contains a word (case-insensitive)? Use =ISNUMBER(SEARCH("word", A1)). Returns TRUE if found regardless of case, FALSE otherwise. Avoids #VALUE! error.
- Can SEARCH find multiple patterns? Not directly. Use OR with multiple ISNUMBER(SEARCH()): =OR(ISNUMBER(SEARCH("cat",A1)), ISNUMBER(SEARCH("dog",A1))) checks for either word.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.