Skip to content

FIND

Returns the position of one piece of text inside another. It is case-sensitive and does not allow wildcards.

Syntax

=FIND(, , )

Text

All versions of Excel.

Try it

Edit the formula in C2 or change the inputs. The sheet recalculates as you type.

C2
A
B
C
1
Staff ID
Name
Dash at
2
ENG-0412
Priya
4
3
IT-0077
Marcus
4
5

C2 =FIND("-",A2) returns 4

How FIND works

FIND returns the position of one piece of text inside another. The first character of the text is position 1. On its own the position isn't very useful, but it is the key ingredient when you cut text apart with LEFT, RIGHT and MID.

The arguments

  • find_text is what to look for.
  • within_text is the text to search.
  • start_num is where to begin. It is optional. By default FIND looks from the first character and returns the first match.

=FIND("-","ENG-0412") returns 4. If the text isn't found, FIND returns #VALUE!. That is the error you see for a missing marker, not #N/A.

Case-sensitive, no wildcards

FIND treats "A" and "a" as different characters, and =FIND("A","banana") returns #VALUE!. It also treats * and ? as plain characters. SEARCH is the variant that ignores case and accepts wildcards. If you don't need case sensitivity, SEARCH is the more forgiving choice. If you do, such as telling RUSH from Rush, use FIND.

Finding a later match

FIND returns only the first match unless you set start_num. To find the second dash in PW-24-0113, look for the first, then search again from the next position: =FIND("-",A2,FIND("-",A2)+1) returns 6. The position is always counted from the start of the whole text, not from start_num.

Checking whether text contains something

FIND's error is useful. Wrap the result in ISNUMBER to get TRUE or FALSE: =ISNUMBER(FIND("RUSH",A2)) is TRUE when A2 contains RUSH in capitals. To return a number or a default instead of the error, use IFERROR: =IFERROR(FIND("@",A2),0) returns 0 when there is no @.

Cutting text apart

The main use of FIND is to give LEFT, MID and RIGHT their length or start. To get everything before the first dash: =LEFT(A2,FIND("-",A2)-1). To get the text after it: =MID(A2,FIND("-",A2)+1,100). The -1 and +1 stop you from including the dash itself.

In Excel for Microsoft 365 and Excel 2024, TEXTBEFORE, TEXTAFTER and TEXTSPLIT cover most of these jobs without any position arithmetic. FIND and its partners remain the tool for older versions and for the unusual cases those functions don't handle.

FIND and FINDB

FINDB is a variant that counts in bytes for double-byte languages. For most workbooks, FIND is the one to use.

Arguments

find_text
The text to look for, such as "-" or a cell reference. The match is case-sensitive, and * and ? are ordinary characters, not wildcards.
within_text
The text to search, usually a cell such as A2.
start_numoptional
The position to start searching from, counting the first character as 1. The default is 1. A value below 1 or beyond the end of the text returns #VALUE!. The position returned is still counted from the start of the text.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Position of a separator

C2 =FIND("-",A2)

Result: 4

The dash is the fourth character of ENG-0412. In IT-0077 it is the third.

C2
A
B
C
1
Staff ID
Name
Dash at
2
ENG-0412
Priya
4
3
IT-0077
Marcus
4
5

C2 =FIND("-",A2) returns 4

Example 2

Find the second occurrence with start_num

C2 =FIND("-",A2,FIND("-",A2)+1)

Result: 6

The inner FIND returns 3. Searching again from position 4 finds the next dash at 6.

C2
A
B
C
1
Batch code
Qty
2nd dash at
2
PW-24-0113
400
6
3
4

C2 =FIND("-",A2,FIND("-",A2)+1) returns 6

Example 3

FIND is case-sensitive: test whether a note contains RUSH

C3 =ISNUMBER(FIND("RUSH",B3))

Result: FALSE

B3 contains "Rush", not "RUSH", so FIND returns #VALUE! and ISNUMBER turns that into FALSE. With SEARCH the result would be TRUE.

C3
A
B
C
1
Order
Note
Rush?
2
SO-7719
RUSH: dispatch today
3
SO-7720
Rush job, call first
FALSE
4
SO-7721
Standard delivery
5

C3 =ISNUMBER(FIND("RUSH",B3)) returns FALSE

Example 4

Return 0 instead of an error when the text is missing

C3 =IFERROR(FIND("@",A3),0)

Result: 0

front-desk has no @, so FIND would return #VALUE!. IFERROR replaces it with 0.

C3
A
B
C
1
Contact
Team
@ at
2
dana.whitfield@example.com
Finance
3
front-desk
Facilities
0
4

C3 =IFERROR(FIND("@",A3),0) returns 0

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B2, return the position of the dash in the staff ID in A2. Fill it down to B5.

Answer in B2, then it fills down to B5.

B2
A
B
C
D
1
Staff ID
Dash at
Note
Urgent (caps)?
2
ENG-0412
RUSH: dispatch today
3
IT-0077
Standard delivery
4
FIN-0305
Rush job, call first
5
OPS-1120
Customer asked for RUSH
6
7

Common mistakes

  • FIND returns #VALUE!, not #N/A, when the text isn't found. Use IFERROR(FIND(...), 0) or ISNUMBER(FIND(...)) to handle it.
  • FIND is case-sensitive. =FIND("a","Banana") returns 2, but =FIND("A","Banana") returns #VALUE!. Use SEARCH if case shouldn't matter.
  • FIND does not support wildcards. =FIND("N*","North") looks for a literal asterisk and returns #VALUE!. Use SEARCH when you need * or ?.
  • The position is counted from the start of the whole text, even when you set start_num. If you search from position 5 and find a match at the 8th character, FIND returns 8, not 4.
  • A start_num below 1 or beyond the end of the text returns #VALUE!, even when the text would have matched earlier.
  • Hidden spaces change positions. A leading space moves every position by one, so clean the text with TRIM before you use FIND to cut it apart.

Questions people ask

What is the difference between FIND and SEARCH?

FIND is case-sensitive and does not accept wildcards. SEARCH ignores case and accepts `?` and `*`. Everything else, including the arguments and the `#VALUE!` result when nothing matches, is the same.

Why does FIND return #VALUE!?

The text isn't in the cell, or the capitals don't match, or start_num is outside the text. Check the spelling and the case, and use SEARCH if case shouldn't matter.

How do I check whether a cell contains certain text?

Use `=ISNUMBER(FIND("text",A2))` for a case-sensitive test or `=ISNUMBER(SEARCH("text",A2))` for a case-insensitive one. Both return TRUE or FALSE.

How do I find the second or last occurrence of a character?

For the second, search again from just after the first: `=FIND("-",A2,FIND("-",A2)+1)`. For the last one, TEXTAFTER with -1 in Microsoft 365 is easiest. In older versions, replace the nth occurrence with a marker using SUBSTITUTE, then FIND the marker.

Can FIND search a whole column at once?

In Microsoft 365, `=FIND("-",A2:A9)` spills a result for each cell. In older versions, enter the formula in one cell and fill it down.

Learn FIND in a real sheet.

FIND is taught in Logic and text, lesson 11: MID and FIND. Each lesson is a short, graded exercise like the one above.