[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
FINDB ( string-1 , string-2 , [ start-pos ] )
Description: Performs a case-sensitive search for the first occurrence of string-1 in string-2, starting at byte position start-pos within string-2. (FINDB is intended for use with languages that use the double-byte character set (DBCS), whereas FIND (§3.17.7.118) is intended for use with languages that use the single-byte character set (SBCS).)
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 byte 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: Assuming 1-byte characters
FINDB("de","abcdef") results in 4
FINDB(A10,B10) results in 4, when A10 contains de, and B10 contains abcdef
end example]