SheetsLessons
Text function

SEARCH function in Google Sheets

SEARCH finds the position of text inside other text, ignoring upper and lower case. Wrapped in ISNUMBER, it's the standard "does this cell contain…?" test.

Syntax

=SEARCH(search_for, text_to_search, [starting_at])
search_for
The text to look for.
text_to_search
The text to search in.
starting_at
Optional. Position to start from.

Practice SEARCH

Task 1 of 2

The word "error" appears in each log line, with inconsistent capitalization. Find its position in A2, ignoring case. Answer in B2.

B2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

SEARCH examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABC
1Raw nameSKUNote
2  maya   PATEL ELC-0427-NYRefund requested
3leo rossiFUR-1180-TXShipped
4AVA KIMOFC-0093-CARefund issued
Messy imported data
FormulaResultWhat it shows
=SEARCH("refund", C2)1Found despite the capital R.
=SEARCH("issued", C4)8Position of a later word.
=SEARCH("refund", C3)#VALUE!Not present returns #VALUE!.
=ISNUMBER(SEARCH("refund", C3))FALSEThe safe TRUE/FALSE version.

Tips and common mistakes

  • FIND is the case-sensitive twin.

Related functions