File picker

The Excel SEARCH function returns 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 wildcards, and is not case-sensitive.

Purpose:  Get the location of text in a string  
Return value:  A number representing the location of find_text.  
Syntax=SEARCH (find_text, within_text, [start_num])

Examples:

To return the position of the first “a” in the word “Apple“:
=SEARCH("a","Apple") // returns 1
Note: fixed text values must be enclosed in double-quotes (“”).
To find the first match of “the” in any combination of upper or lowercase:
=SEARCH("the","The cat in the hat") // returns 1  

Same search, starting at character 4:
=SEARCH("the","The cat in the hat",4) // returns 12  
Wildcard usage: =SEARCH("?at","The cat in the hat") // returns 5  
Error if not found: =SEARCH("dog","The cat in the hat") // returns #VALUE!  

SEARCH can be used together with the ISNUMBER function to test for specific text in a cell: =ISNUMBER(SEARCH(substring,text)) // returns TRUE or FALSE

SEARCH returns the position of the first find_text in within_text. Start_num is optional and defaults to 1.
Use the FIND function for a case-sensitive search.
SEARCH allows the wildcard characters question mark (?) and asterisk (*), in find_text.
                    ? matches any single character and
                   * matches any sequence of characters.
                   To find a literal ? or *, use a tilde (~) before the character, i.e. ~* and ~?.

We also have documentation on more excel functions like round, randbetween, now, find and many more. Please do add your comment to start the discussion.
   

Related Posts

Leave a Reply