Site icon ExcelNotes

How to Use SEARCH Function

The SEARCH function searches a text string from another and returns the location in the second text string. For example, the result returns 2 when searching the text string "ear" from the second text string "SEARCH Function".

Formula:

=SEARCH(find_text,within_text,[start_num])

Explanations:

– Find_text is required, the text string that you need to find;

– Within_text is required, the second text string that contains "Find_text";

– [Start_num] is optional, the starting point that you start your search. When it is omitted, it is assumed to be 1.

Cautions:

– When [Start_num] is less than 1, returns #VALUE! error;

– If "Within_text" does not contain "Find_text", the result returns #VALUE! Error;

– If [Start_num] has decimals, only integer portion will be extracted;

– The SEARCH function is not case sensitive, so please refer to FIND function when you do case sensitive search.

Example 1: What is the position of the first letter "s" in the text string "How to use the search function"?

=SEARCH ("s", B1)

The first "s" in the string "How to use the search function" is at the 9th position.

Example 2: What is the position of 2nd letter "s" in the text string "How to use the search function"?

=SEARCH ("s", B1, 10)

The 2nd "s" in the string "How to use the search function" is at the 16th position.

Download: SEARCH Function

Exit mobile version