home.gif next.gif prev.gif



SEARCH

See also A-Z Spreadsheet Function List


Description Locates the position of the first character of a specified text string within another text string.

Syntax SEARCH(search_text, text [, start_position])

search_text is the text to find.

bullet.gif 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.

bullet.gif To search for an asterisk or question mark, include a tilde (~) before the character.

text is the text to be searched.

start_position is 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. Omitting this argument assumes a starting position of 1.

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.

See Also FIND , MID , REPLACE , and SUBSTITUTE functions

Examples SEARCH(“?5”, “Bin b45”) returns 6

         SEARCH(“b”, “Bin b45”, 4) returns 5