FIND

FIND(find_text, within_text [,start_num])

Returns the starting position of a substring within a larger text string.

find_textThe text you want to find.
within_textThe text containing the text you want to find.
start_num(Optional) The character at which to start the search (default is 1).

REMARKS
* This function is case sensitive.
* For a non case sensitive search, use the SEARCH function.
* This function does not support wildcards (? and *).
* This function will always return the first instance of the text you want to find (reading from left to right).
* This function returns a #VALUE when the text does not appear (ie. "find_text" does not appear in "within_text").
* The "find_text" can either be a literal string enclosed in quotation marks or a cell reference.
* The "within_text" can either be a literal string enclosed in quotation marks or a cell reference.
* If "start_num" is greater than the position of the last occurrence of "find_text", then #VALUE! is returned.
* If "start_num" > the length of "within_text", then #VALUE! is returned.
* If "start_num" < 1, then #VALUE! is returned.
* If "start_num" is left blank, then 1 is used.
* Any blank spaces or punctuation marks count as individual characters.
* You can use the EXACT function to return the value True or False based on whether two strings match exactly.
* You can use the SEARCH function to return the position of a substring within a larger text string. This is not case sensitive.
* You can use the SUBSTITUTE function to return the text string with a substring substituted for another substring.
* You can use the FINDB function if you have languages that use the double byte character set.
* You can use the TEXTAFTER function to return the characters from the end of a text string after a delimiter.
* You can return the position of a double quote by using CHAR(34) instead.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 A
1=FIND("M", "Miriam McGovern") = 1
2=FIND("m", "Miriam McGovern") = 6
3=FIND("m", "Miriam McGovern", 1) = 6
4=FIND("A", "AAAAAAA", 3) = 3
5=FIND("%","1       3%$%456") = 10
6=FIND(4, "1 2 3 4 5 6") = 7
7=FIND("B","A     B",1) = 6
8=FIND("middle", "start middle end", 1) = 7
9=FIND(CHAR(34), "my string with ""double quotes""") = 16
10=FIND("B", "AAAAAA") = #VALUE!
11=FIND("b", "a b c d e", 5) = #VALUE!
12=FIND("A", "AAAA", 20) = #VALUE!
13=FIND("A", "AAAA", 0) = #VALUE!

1 - What is the position of the substring "M" in the text string "Miriam McGovern". This is the first M, starting on the left.
2 - What is the position of the substring "m" in the text string "Miriam McGovern".
3 - What is the position of the substring "m" in the text string "Miriam McGovern".
4 - What is the position of the substring "A" in the text string "AAAAAAA" starting at character position 3.
5 - What is the position of the substring "%" in the text string "1       3%$%456".
6 - What is the position of the substring "4" in the text string "1 2 3 4 5 6".

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top