FIND and SEARCH functions in Excel
FIND and SEARCH return the position of one piece of text inside another; FIND is case sensitive and SEARCH is not.
FIND and SEARCH do not return text. They return a number: the position at which one text starts inside another. That number is what LEFT, RIGHT and MID need in order to cut at the right place, and it is the basis of every "does this cell contain...?" test.
Syntax
=FIND(find_text, within_text, [start_num])=SEARCH(find_text, within_text, [start_num])| Argument | What it is |
|---|---|
find_text | The text to look for. |
within_text | The text to look in. |
start_num | The position to start looking from. 1 if left out. |
Examples
Each result below is what Excel itself showed for the formula on the sample sheet.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Full name | Code | Amount as text | |
| 2 | asha verma | asha.verma@example.com | PB-10-1234 | 1,250 |
| 3 | RAVI KUMAR | ravi@example.org | DL-08-0042 | 300 |
| 4 | meena gill | meena.gill@example.com | MH-12-9876 | 45.50 |
| 5 | Kabir Khan | kabir@example.net | RJ-14-0007 | 12 kg |
=FIND("@",B2)Result: 11The @ sign is the 11th character of asha.verma@example.com.
=FIND("-",C2)Result: 3The first dash in PB-10-1234 is at position 3.
=FIND("-",C2,4)Result: 6Starting the search at position 4 finds the second dash, at position 6.
=SEARCH("kumar",A3)Result: 6SEARCH ignores case, so it finds "kumar" in RAVI KUMAR, at position 6.
=FIND("kumar",A3)Result: #VALUE!FIND is case sensitive. The small letters are not in the cell, so the result is #VALUE!.
=ISNUMBER(SEARCH("example.com",B2))Result: TRUEA "contains" test: TRUE if the text is found anywhere.
=IF(ISNUMBER(SEARCH("gill",A4)),"Gill family","Other")Result: Gill familyThe contains test inside IF.
=SEARCH("?H-",C4)Result: 1SEARCH allows wildcards: any one character followed by H and a dash. It matches MH- at position 1.
How they work
Both look for the first argument inside the second and return the position of its first character, counting from 1. If the text occurs more than once, the first occurrence is reported. If it does not occur at all, the result is the error #VALUE!.
The two differences
| FIND | SEARCH | |
|---|---|---|
| Capital and small letters | must match | are ignored |
Wildcards * and ? | not allowed | allowed |
Use SEARCH for ordinary "contains" tests, where "Delhi" and "DELHI" should both count. Use FIND when case matters, or when you are looking for a real question mark or star.
Does the cell contain this text?
Excel has no CONTAINS function. The standard formula is:
=ISNUMBER(SEARCH("text", A2))
SEARCH returns a number when the text is found and an error when it is not. ISNUMBER turns that into TRUE or FALSE. Put it inside IF to label rows, as the seventh example does, or use it as a Conditional Formatting rule to colour them.
To count or add the rows that contain a text, COUNTIF and SUMIF with wildcards are simpler: =COUNTIF(A2:A100,"*gill*").
Cutting at a marker
The usual partners:
- text before a marker:
=LEFT(A2, FIND(" ", A2) - 1) - text after a marker:
=MID(A2, FIND(" ", A2) + 1, 100)
The second or third occurrence
The third argument sets where the search begins. To find the second dash, start one character after the first:
=FIND("-", A2, FIND("-", A2) + 1)
A neater way to reach the nth occurrence uses SUBSTITUTE, which can change one particular occurrence. Replace the nth dash with a character that cannot appear in the data, and find that character: =FIND("~", SUBSTITUTE(A2, "-", "~", 2)).
Handling "not found"
A #VALUE! error will spread to every formula that uses the result. Deal with it at the source:
=IFERROR(FIND("-", A2), 0)returns 0 when there is no dash;- or test first with ISNUMBER, as above.
When cutting names at a space, a name with no space would otherwise break the formula: =IFERROR(LEFT(A2, FIND(" ", A2) - 1), A2) returns the whole name in that case.
Wildcards in SEARCH
A question mark stands for any single character and a star for any run of characters. =SEARCH("b?g", A2) finds bag, big or bug. To look for an actual question mark or star with SEARCH, put a tilde before it: "~?". FIND needs no tilde, since it takes every character literally.
Common mistakes
- Using FIND and being caught by case.
- Forgetting that the result is a position, not the text.
- No error handling for cells where the text is absent.
- Leading spaces in the cell, which shift every position by one. TRIM first.
In Google Sheets
FIND and SEARCH work the same way in Google Sheets. Sheets also has REGEXMATCH for pattern tests.
Related functions
Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.
This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.