<< Go back to all functions

SEARCH

The SEARCH function in Google Sheets returns the position at which a string is first found within text. With this function, you can easily locate specific words or phrases in a cell or a range of cells. Explore our comprehensive guide to learn how to effectively use the SEARCH function.

Function Syntax and Parameters

Syntax: SEARCH(search_for, text_to_search, [starting_at])

Parameters:

  • search_for: The string or cell reference you want to search for within the text.
  • text_to_search: The text or cell range in which you want to search.
  • starting_at [Optional]: The character number at which you want to start the search. If omitted, the search starts from the first character.

Step-by-Step Tutorial

  1. Using SEARCH to find a specific word:

    • Example: =SEARCH("apple", A1)
    • Result: Returns the position of the first occurrence of the word "apple" within cell A1.
  2. Using SEARCH with a range of cells:

    • Example: If cells A1:A5 contain the text "apple, banana, cherry, date, elderberry", then =SEARCH("b", A1:A5) will return the relative positions of "b" within each cell.

Use Cases and Scenarios

  1. Data Extraction: Find specific data patterns within a large dataset.
  2. Text Manipulation: Locate and extract specific words or phrases within a document.
  3. Conditional Formatting: Highlight cells containing specific keywords.

Related Functions

  • FIND: Similar to SEARCH, but case-sensitive.
  • SEARCHB: Searches for a string within a text, using byte-by-byte comparison.

Related Articles