Related Topics: | ||
Description: Finds one text string within another text string, and returns the number of the starting position of Find_text, from the leftmost character of Within_text. FIND is case sensitive and cannot include wildcard characters.
FIND is intended for use with languages that use the single-byte character set (SBCS). FIND always counts each character, whether single-byte or double-byte, as 1, no matter what the default language setting is.
Syntax: FIND(Find_text, Within_text, [Start_num])
Find_text is the text you want to find.
Within_text is the text containing the text you want to find.
Start_num specifies the character at which to start the search. The first character in Within_text is character number 1. If you omit Start_num, it is assumed to be 1.
Remarks:
FIND is case sensitive and doesn't allow wildcard characters. If you don't want to do a case sensitive search or use wildcard characters, you can use the SEARCH function.
If Find_text is “” (empty text), FIND matches the first character in the search string (that is, the character numbered Start_num or 1).
If Find_text does not appear in Within_text, FIND returns the #VALUE! error value.
Start_num must be greater than 0.
Start_num must be less than or equal to the length of Within_text.
Use Start_num to skip a specified number of characters. Using FIND as an example, suppose you are working with the text string "AYF0093.YoungMensApparel". To find the number of the first "Y" in the descriptive part of the text string, set Start_num equal to 8 so that the serial-number portion of the text is not searched. FIND begins with character 8, finds Find_text at the next character, and returns the number 9. FIND always returns the number of characters from the start of Within_text, counting the characters you skip if Start_num is greater than 1.
Example:
FIND("M", "Miriam McGovern") = 1 [the position of the first "M" in the string]
FIND("m", "Miriam McGovern") = 6 [the position of the first "m" in the string above]
FIND("M", "Miriam McGovern", 3) = 8 [the position of the first "M" in the string above, starting with the third character]
© 1992-2013. ReliaSoft Corporation. ALL RIGHTS RESERVED.