ShareYourGroupShareYourGroupExcel Formulas

Text functions

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])
ArgumentWhat it is
find_textThe text to look for.
within_textThe text to look in.
start_numThe 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.

Sample sheet: Text as people really type it: stray spaces, mixed capitals, codes with dashes.
ABCD
1Full nameEmailCodeAmount as text
2  asha   verma asha.verma@example.comPB-10-12341,250
3RAVI KUMARravi@example.orgDL-08-0042300
4meena gillmeena.gill@example.comMH-12-9876 45.50 
5Kabir Khankabir@example.netRJ-14-000712 kg

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

FINDSEARCH
Capital and small lettersmust matchare ignored
Wildcards * and ?not allowedallowed

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:

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:

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.

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

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.