FIND (search for text in a text string)

<< Click to Display Table of Contents >>

FIND (search for text in a text string)

Syntax:

FIND(SearchText, TextString [, StartPos])

Description:

This returns the position of SearchText within the TextString.

StartPos (optional) lets you specify the position in the text string, from which the search should start. If omitted, the search starts at the first character.

The FIND function is case-sensitive. To perform a non-case-sensitive search, use the SEARCH function instead.

Example:

FIND("a", "Banana") returns 2

FIND("A", "Banana") returns the #VALUE! error value, since the text string does not contain an uppercase "A".

FIND("a", "Banana", 3) returns 4

FIND("x", "Banana") returns the #VALUE! error value, since "x" does not occur in "Banana".

For example, if the word "banana" is in cell B5, you can enter the formula as follows:

FIND("a", B5) returns 2

See also:

SEARCH, REPLACE, SUBSTITUTE, EXACT, MID