Skip to content
Google Sheets

SEARCH function in Google Sheets

Returns the position at which a string is first found within text.

=SEARCH(search_for, text_to_search, [starting_at])

SEARCH syntax and parameters

Three arguments, two required.

  • search_forstringRequired

    The string to look for within text_to_search.

  • text_to_searchstringRequired

    The text to search for the first occurrence of search_for.

  • starting_atnumberOptional

    [ OPTIONAL - 1 by default ] - The character within text_to_search at which to start the search.

SEARCH examples

Formulas you'll actually reuse.

  1. Where “invoice” appears in a subject line — case-insensitive, unlike FIND:

    =SEARCH("invoice", A2)

    Result12

  2. Tag rows whose text contains a keyword:

    =IF(ISNUMBER(SEARCH("urgent", A2)), "Priority", "Normal")

    Result"Priority"

SEARCH in Excel

Same name — your formula ports as-is.

Try SEARCH in the playground

Edit the example — nothing to install.

Preloaded with the SEARCH formula from Example 1 — change anything and watch it respond.

Loading the editor…

SEARCH errors

What they mean — and the fixes.

  • #VALUE!

    The text wasn't found — wrap SEARCH in ISNUMBER for a TRUE/FALSE test instead of an error.