SEARCH returns the position of one text string inside another, ignoring uppercase and lowercase. It also supports wildcards like ? and *, so you can find patterns, not just exact text.
=SEARCH(find_text, within_text, [start_num])What does SEARCH do?
SEARCH is a text function that tells you where a piece of text appears inside a longer string. Give it the text to find and the text to search in, and it returns a number: the starting position of the match. If the text is not found, SEARCH returns #VALUE!. Unlike FIND, SEARCH is not case-sensitive, so "excel" and "Excel" are treated the same.
This matters because many everyday tasks depend on knowing whether and where text appears. You might need to check if an email address contains a domain, split a product code at a dash, or flag comments that mention a keyword. SEARCH gives you that position, which you can feed into other functions like LEFT, MID, or IF.
A common situation: a customer service team receives a list of free-text notes and wants to flag any note mentioning "refund". With SEARCH inside ISNUMBER, they can mark those rows automatically instead of reading every line. SEARCH also handles wildcards, so you can look for patterns such as a three-letter code followed by a dash.
When to use SEARCH
- Check whether a cell contains a specific word or phrase, regardless of case.
- Find the position of a character (such as @ or -) to split text with LEFT or MID.
- Flag rows where a keyword appears in comments or descriptions.
- Validate that an email address contains an @ symbol.
- Locate a product category code inside a longer SKU.
- Search for patterns using wildcards, such as a question mark for any single character.
SEARCH syntax
=SEARCH(find_text, within_text, [start_num])| Argument | Required? | What to enter |
|---|---|---|
find_text | Required | The text you want to find. It can be a literal string, a cell reference, or include wildcards. Example: "@" or A2. |
within_text | Required | The text to search inside. Usually a cell reference. Example: B2. |
start_num | Optional | The character position to start searching from. Default is 1. Use it to skip earlier matches. Example: 5. |
What it returns: A number: the position of the first character of find_text within within_text. Returns #VALUE! if find_text is not found.
SEARCH examples
1 Find a word in a product name
The goal is to find where the word "Pro" starts in each product name. The formula =SEARCH("Pro",A2) looks through the text in A2 and returns the position of the first P. For "Laptop Pro 15", "Pro" starts at position 8. For "Pro Tablet", it starts at position 1. If the word is missing, SEARCH returns #VALUE!.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product | Price | |||
| 2 | Laptop Pro 15 | 1200 | 8 | ||
| 3 | Pro Tablet | 650 | |||
| 4 | Basic Mouse | 25 | |||
| 5 | Pro Keyboard | 90 | |||
| 6 |
2 Check for an @ symbol in an email
Here we want to confirm that each email address contains an @. The formula =SEARCH("@",A2) returns the position of the @ character. For "anna@example.com", the @ is at position 5. For "ben.smith@work.org", it is at position 10. This number can be used with LEFT to extract the username.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Department | ||||
| 2 | anna@example.com | Sales | 5 | ||
| 3 | ben.smith@work.org | IT | |||
| 4 | carla@company.net | HR | |||
| 5 |
3 Find a dash to split a product code
Product codes often use a dash to separate category and item number. The formula =SEARCH("-",A2) finds the position of the first dash. For "EL-1001", the dash is at position 3. You can then use =LEFT(A2,SEARCH("-",A2)-1) to get "EL". If no dash exists, SEARCH returns #VALUE!.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | Quantity | |||
| 2 | EL-1001 | 50 | 3 | ||
| 3 | OF-2002 | 30 | |||
| 4 | FU-3003 | 20 | |||
| 5 |
4 Flag notes that mention a keyword
A support team wants to know which notes mention "refund". The formula =ISNUMBER(SEARCH("refund",A2)) returns TRUE if the word appears and FALSE if not. SEARCH is not case-sensitive, so "Refund" and "REFUND" also match. For "Customer asked for refund", SEARCH finds "refund" at position 18, so ISNUMBER returns TRUE.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Note | Ticket | |||
| 2 | Customer asked for refund | 101 | TRUE | ||
| 3 | Delivery was late | 102 | |||
| 4 | REFUND processed | 103 | |||
| 5 | Product damaged | 104 | |||
| 6 |
5 Use a wildcard to find a pattern
Sometimes you need to find a pattern, not an exact word. The formula =SEARCH("??-",A2) looks for any two characters followed by a dash. For "AB-123", the pattern starts at position 1. The question mark is a wildcard that matches any single character. This is useful for validating codes that should begin with two letters and a dash.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | Status | |||
| 2 | AB-123 | Active | 1 | ||
| 3 | X-456 | Active | |||
| 4 | CD-789 | Active | |||
| 5 |
Common SEARCH errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The text you are looking for does not appear in the cell, or the cell is empty. | Wrap SEARCH in IFERROR to return a friendly message, or use ISNUMBER(SEARCH(...)) to get TRUE/FALSE instead of an error. |
| #NAME? | The function name is misspelled, such as =SERACH(...). | Check the spelling: it must be SEARCH. |
| #VALUE! | start_num is less than 1 or greater than the length of within_text. | Use a start_num between 1 and LEN(within_text). Omit it to start from the beginning. |
| Wrong position returned | You expected a later match but SEARCH always returns the first match from start_num. | Increase start_num to skip earlier matches, or use a different approach to find the last occurrence. |
Tips for using SEARCH
- Use SEARCH when case does not matter; use FIND when it does.
- Combine with ISNUMBER to turn SEARCH into a simple TRUE/FALSE test for a keyword.
- Remember that ? matches any one character and * matches any sequence of characters.
- To find a literal ? or , put a tilde before it: ~? or ~.
- Use start_num to search after a certain position, such as after an @ symbol.
- SEARCH returns a number, so you can subtract 1 and feed it into LEFT to extract text before the match.
Frequently asked questions
What is the difference between SEARCH and FIND?
SEARCH is not case-sensitive and supports wildcards. FIND is case-sensitive and does not support wildcards. Use SEARCH for flexible matching and FIND when case matters.
Why does SEARCH return #VALUE!?
SEARCH returns #VALUE! when the text is not found. Wrap it in IFERROR or ISNUMBER to handle missing text gracefully.
Can SEARCH use wildcards?
Yes. The question mark ? matches any single character, and the asterisk * matches any sequence of characters. Use a tilde ~ before ? or * to search for them literally.
Does SEARCH work with numbers?
SEARCH treats numbers as text. If you search for 123 in a cell containing 12345, it returns 1. Convert numbers to text with TEXT if you need consistent behaviour.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. SEARCH reference