SEARCH Function In Excel

This Excel Tutorial demonstrates how to use the Excel SEARCH Function in Excel to locate the position of text within a cell, with formula examples.

SEARCH Function Description:

The SEARCH Function Finds a character or text string and returns it’s position in the cell. Not Case-sensitive.

Formula Examples:

search function examples

ExampleFormulaResult
Seartch Text=SEARCH(C5,D5)1
Search Text – starting at Char 5=SEARCH(C6,D6,E6)12
Non-matching Case=SEARCH(C7,D7)1
Wildcard=SEARCH(C8,D8)1
ERROR: String Not Found.=SEARCH(C9,D9)#VALUE!

Syntax and Arguments:

The Syntax for the SEARCH Formula is:

Function Arguments ( Inputs ):

find_text – The string of text that you wish to find.

within_text – The original string of text.

start_num – OPTIONAL. The character number from which to start the search. Note: This only changes the search range, it will not affect the number returned when a match is found. Example: searching for “s” in string “suns” will return 1 by default, but if the start_num is set to 2, it will return 4.

Additional Notes

The SEARCH Function is a non case-sensitive version of the FIND Function. SEARCH also supports wildcards. Find does not.

SEARCH Examples in VBA

You can also use the SEARCH function in VBA. Type:
application.worksheetfunction.search(find_text,within_text,start_num)
For the function arguments (find_text, etc.), you can either enter them directly into the function, or define variables to use instead.

Return to the List of all Functions in Excel

How to use the SEARCH Function in Excel:

To use the AND Excel Worksheet Function, type the following into a cell:
=AND(
After entering it in the cell, notice how the AND formula inputs appear below the cell:
search formula syntax
You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=SEARCH(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:
how to use the search function in excel

For more information about the SEARCH Formula visit the
Microsoft Website.

ADS GO HERE

Posted in