Description Locates the position of the first character of a specified text string within another text string.
Syntax SEARCH ( search_text, text [, start_position] )
Argument | Description |
---|---|
search_text | The text to find. The search string can contain wildcard characters. The available wildcard characters are * (asterisk), which matches any sequence of characters, and ? (question mark), which matches any single character.To search for an asterisk or question mark, include a tilde (~) before the character. |
text | The text to be searched. |
[start_position] | Optional. The character position where the search begins. If the number you specify is less than 0 or greater than the number of characters in text, #VALUE! is returned. If this argument is omitted, 1 is used. |
Remarks Text is searched from left to right, starting at the position specified. The search is not case-sensitive. If text does not contain the search string, #VALUE! is returned.
Examples This function returns 6:
This function returns 5:
See Also FIND, MID, REPLACE, SUBSTITUTE