How to use the Excel SEARCH function

The SEARCH function is a built-in function in Excel that is categorized as a String/Text Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the SEARCH function can be entered as part of a formula in a cell of a worksheet.

Syntax: =SEARCH(find_text, within_text, start_num)

The SEARCH function syntax has the following arguments:

  • find_text – The text to find.
  • within_text – The text to search within.
  • start_num – [optional] Starting position in the text to search. Optional, defaults to 1.

Example: Let’s look at some Excel SEARCH function examples and explore how to use the SEARCH function as a worksheet function in Microsoft Excel:

Excel SEARCH Function 2 - How to use the Excel SEARCH function

Syntax: =SEARCH(A2,B2,C2) 

Result:

Excel SEARCH Function 1 - How to use the Excel SEARCH function

Based on the Excel spreadsheet above, the following SEARCH examples would return:

Syntax: =SEARCH(A3,B3,C3)
Result: 5

Syntax: =SEARCH(A4,B4,C4)
Result: 13

Syntax: =SEARCH(A4,B4,C4)
Result: 7

Syntax: =SEARCH(A6,B6,C6)
Result: 6

Syntax: =SEARCH(A7,B7,C7)
Result: 10

Note: Use the SEARCH function to get the location of one text string inside another.

  • SEARCH returns the position of the first character of find_text inside within_text.
  • Unlike FIND, SEARCH allows the use of wildcards, and is not case-sensitive.
  • SEARCH allows the wildcard characters question mark (?) and asterisk (*), in find_text.
  • The ? matches any single character and the * matches any sequence of characters.
  • To find a literal ? or *, use a tilde (~) before the character, i.e. ~* and ~?.

Add a Comment

Your email address will not be published. Required fields are marked *