Home › Excel functions › FIND & SEARCH
FIND and SEARCH in Excel: Locate Text in a Cell
FIND and SEARCH return the position of a piece of text inside a cell. That's useful on its own, but mainly as a building block: to check if a cell contains a word, or to extract everything before or after a character.
In this guide
Syntax
=FIND(find_text, within_text, [start_num]) =SEARCH(find_text, within_text, [start_num])Both return a number: the position of the first character of the match. =FIND("@", "anna@example.com") returns 5. If the text isn't found, both return #VALUE!.
The difference
| FIND | SEARCH | |
|---|---|---|
| Case-sensitive | Yes | No |
| Wildcards (* and ?) | No | Yes |
"excel" in "Excel CSE" | #VALUE! | 1 |
In most everyday cases you want SEARCH, because "Urgent" and "urgent" should both count.
Check if a cell contains a word
Wrap SEARCH in ISNUMBER: a number means found, an error means not found.
=ISNUMBER(SEARCH("urgent", A2))Returns TRUE or FALSE. Inside IF:
=IF(ISNUMBER(SEARCH("urgent", A2)), "Priority", "")This is also the way to filter on partial text with FILTER and to use "contains" in conditional formatting.
Extract text before or after a character
- Username from an email:
=LEFT(A2, FIND("@", A2)-1)returns "anna". - Domain:
=MID(A2, FIND("@", A2)+1, 100)returns "example.com".
See LEFT, RIGHT and MID. In Microsoft 365 and Excel 2024, TEXTBEFORE and TEXTAFTER do this without FIND.
Find the second occurrence
Use start_num to begin searching just after the first match:
=FIND("-", A2, FIND("-", A2)+1)In "P-104-NL" this returns 6, the position of the second dash.
Frequently asked questions
Why does FIND return #VALUE!?
The text wasn't found, possibly because of different capitalization. Use SEARCH for a case-insensitive search, and IFERROR to handle missing values.
How do I check if a cell contains one of several words?
Combine checks with OR: =OR(ISNUMBER(SEARCH("urgent", A2)), ISNUMBER(SEARCH("asap", A2))).
Can SEARCH use wildcards?
Yes. =SEARCH("inv*2026", A2) finds "inv" followed by anything and then "2026".