Excel function

SEARCHfunction

Returns the position of one text inside another (case ignored, wildcards allowed).

All versions
=SEARCH("sheet", "Excel Sheet guide")

find_text5 chars

1s
2h
3e
4e
5t

within_text17 chars

1E
2x
3c
4e
5l
6·
7S
8h
9e
10e
11t
12·
13g
14u
15i
16d
17e

Put "s?eet" or "ex*l" in find_text. Try breaking it on purpose to see the errors.

Result

7

find_text

The text to find. Case is ignored; ? is any one character and * is any characters. To find ? itself, write ~?.

within_text

The text to search in.

start_num

Which character to start searching from. If omitted, 1. The result is always counted from the start. Clicking a character also changes it.

What is the SEARCH function?

=SEARCH(find_text, within_text, [start_num])

SEARCH returns the position of find_text like FIND, but it ignores case and accepts wildcards.

? matches any one character and * matches any number of characters. To find a question mark or asterisk itself, put ~ in front. The matched part is highlighted in green, so you can see how far a wildcard reaches.

Arguments

find_text
The text to find. You can use ?, * and ~.
within_text
The text to search in.
start_num
Optional. Which character to start from.

SEARCH examples

  1. Example 1. Ignoring case

    =SEARCH("sheet", "Excel Sheet guide")

    Finds "Sheet" with a capital S and returns 7. FIND would return #VALUE!.

  2. Example 2. Example from Microsoft

    =SEARCH("base", "database")

    "base" starts at character 5, so 5.

  3. Example 3. Wildcard

    =SEARCH("s?eet", "Excel Sheet guide")

    ? matches the single h, so 7.

Common mistakes

FAQ

When to use FIND instead?
Use FIND when case must match exactly; use SEARCH to ignore case or search by pattern.
Check whether a text is present?
Use =ISNUMBER(SEARCH("team", A2)).