Learn Excel
EN
Sets how numbers, dates and formulas look, so everything works just like your own Excel.

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
  1. Syntax
  2. FIND vs. SEARCH
  3. Try it yourself
  4. Check if a cell contains
  5. Extract text
  6. The second occurrence
  7. In practice: pull the order number out of a message
  8. Keep learning
  9. FAQ

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

FINDSEARCH
Case-sensitiveYesNo
Wildcards (* and ?)NoYes
"excel" in "Excel CSE"#VALUE!1

In most everyday cases you want SEARCH, because "Urgent" and "urgent" should both count.

FIND & SEARCH practice: try it yourself

Reading is one thing, typing it is another. Build the formula below step by step: the tips tell you what to type next, and you can click or drag across cells to add them, just like in Excel.

Task: Find the position of the @ in the email address, in B2: =FIND("@",A2)

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.

In practice: pull the order number out of a message

Customer messages mention an order number somewhere after a # sign. The position differs per message, so a fixed LEFT or MID won't work. FIND locates the # first:

AB
1MessageOrder number
2Order #48213 has shipped48213
3Question about #50177, please call50177
4Return for order #3992039920
  • B2: =MID(A2, FIND("#", A2)+1, 5)

FIND returns the position of the #, +1 skips the sign itself, and MID takes the five digits after it. Wrap it in VALUE if you want a real number instead of text.

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".