FIND function
SearchText
The text string to find.
MasterText
The search text, that is, the text string within which the
searchText
text string may be present.
StartIndex
The position in the masterText
text string where the
search begins. If omitted, the search begins at the beginning of the
text string. The first character is at position 1.
Returns
The position where the searchText
text string is found
within the masterText
text string, or an error if the text
string cannot be found. The first character is at position 1.
Finds a text string nestled within another text string and returns its position. FIND("st", "test")FIND("st"; "test") returns 3, because "st" starts at the third character in "test".
FIND returns an error if the text string cannot be found. ISERROR may be used to determine if a function returns an error. As such, this formula returns TRUE to indicate that a text string cannot be found:
However, it is simpler to use CONTAINS to determine if a text string contains another text string. This formula returns FALSE:
FIND is case-sensitive, meaning that this formula returns TRUE, indicating that the text string cannot be found:
Use SEARCH instead if you need to perform a case-insensitive match or need support for wildcards (where "a*e" matches text strings like "abcde", "ae", "aqqe", etc). Use REGEXMATCH instead if you need more powerful matching than wildcards can provide.
Examples
Returns 3, because "st" starts at position 3 in "test".
Returns an error. "sT" is not found within "test", because FIND is case-sensitive.
Returns 1, because "test" starts at position 1.
Returns 9, because "test" starts at position 9. The start position has been set to 3, meaning that FIND does not find "test" which starts at position 1, but rather "test" which starts at position 9.
Returns the position where "test" is found within the value of TextField1, or returns an error if it cannot be found.
Returns TRUE if "test" cannot be found within the value of TextField1.
Returns FALSE if "test" cannot be found within the value of TextField1.
Returns the array { 3, 2 }{ 3; 2 }, because "st" starts at position 3 in "test" and "e" starts at position 2.