SEARCH Function in Excel
Master the SEARCH function to find text within strings. Learn case-insensitive searching, wildcards, practical examples, and error solutions.




=SEARCH(find_text, within_text, [start_num])
Practical Examples
Basic Email Domain Search
Find the @ symbol position in email addresses
Case-Insensitive Product Code Search
Locate product codes regardless of case
Wildcard Pattern Matching
Use wildcards to find variable patterns
Finding Multiple Keywords
Check for presence of any keyword from a list
Extract Domain from URL
Find and extract website domain using SEARCH
Data Validation with Error Handling
Validate phone number format and provide feedback
Common Errors and Solutions
SEARCH cannot find the specified text
The find_text doesn't exist within the within_text string, or start_num is greater than the length of within_text
1. Verify the search text exists in your data 2. Check for extra spaces using TRIM 3. Ensure start_num is valid 4. Use IFERROR to handle missing text: =IFERROR(SEARCH(text, cell), "Not Found")
Always validate your data and use IFERROR wrapper for production formulas
Example:
Excel doesn't recognize the function name
Misspelled function name, missing quotes around text, or using SEARCH in a version that doesn't support it
1. Check spelling - it's SEARCH not SEACH or SERACH 2. Ensure text strings are in quotes 3. Verify Excel version compatibility
Use Formula AutoComplete and always put literal text in quotes
Example:
Invalid cell reference in formula
Referenced cells have been deleted or the formula refers to cells that don't exist
1. Check all cell references are valid 2. Re-select the cells if needed 3. Use named ranges for stability
Use structured references or named ranges instead of direct cell references
Example:
SEARCH returns unexpected position number
Not accounting for SEARCH being case-insensitive, or forgetting that position counting starts at 1, not 0
1. Remember SEARCH is case-insensitive (use FIND for case-sensitive) 2. Position 1 means first character 3. Check if there are multiple occurrences
Test with simple examples first and verify position counting
Example:
Best Practices and Advanced Tips
Use ISNUMBER(SEARCH(...)) to get TRUE/FALSE instead of position/error. Perfect for IF statements and conditional formatting: =IF(ISNUMBER(SEARCH("urgent", A1)), "High Priority", "Normal").
To find the second or third occurrence, use nested SEARCH with start_num: =SEARCH("a", A1, SEARCH("a", A1) + 1) finds the second 'a'. Build a recursive pattern for multiple finds.
To search for literal * or ? characters, escape them with tilde (~). Search for '?' using '~?', for '*' using '~*', and for '~' itself using '~~'.
SEARCH can slow down with thousands of rows. For better performance: limit search range, use helper columns for complex searches, and consider array formulas for bulk operations.
SEARCH: case-insensitive, supports wildcards, returns #VALUE! if not found. FIND: case-sensitive, no wildcards, also returns #VALUE!. Choose SEARCH for flexible user input, FIND for exact matching.
Need Help with SEARCH Function in Excel?
Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.
Example Excel formula:
Related Formulas
Master the FIND function to locate text within strings. Learn syntax, handle #VALUE! errors, and explore 7 practical examples for text extraction.

Extract text from the beginning of strings with the LEFT function. Learn syntax, examples, and error solutions for Excel and Google Sheets.

Master the MID function to extract text from any position. Learn syntax, examples, and solutions to common errors for precise text manipulation.

Master the SUBSTITUTE function to replace text in Excel and Google Sheets. Learn syntax, examples, error handling, and advanced text techniques.
