[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
FIND ( string-1 , string-2 [ , start-pos ] )
Description: Performs a case-sensitive search for the first occurrence of string-1 in string-2, starting at character position start-pos within string-2. (FIND is intended for use with languages that use the single-byte character set (SBCS), whereas FINDB (§3.17.7.119) is intended for use with languages that use the double-byte character set (DBCS).)
Arguments:
Name |
Type |
Description |
string-1 |
Designate the string to be searched for within the string designated by string-2. | |
string-2 | ||
start-pos |
number |
The number of the start position within string-2 for which string-1 is to be searched. The start position of the first character is 1. If omitted, a position of 1 shall be assumed. start-pos shall be at least 0. |
Return Type and Value: number – The start position of the first occurrence of string-1 in string-2, starting at character position start-pos within string-2. If string-1 is an empty string, it shall always be found in any string-2 at position start-pos, or at position 1 if start-pos is omitted.
However, if
• string-1 is not found within string-2, #VALUE! is returned.
• start-pos designates a position outside string-2, #VALUE! is returned.
[Example:
FIND("de","abcdef") results in 4
FIND(A10,B10) results in 4, when A10 contains de, and B10 contains abcdef
end example]