FIND(find_text, within_text [,start_num])

Returns the 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.

Remarks

* This function is case sensitive.
* For a non case sensitive search, use the SEARCH function.
* This function does not support wildcards (? or *).
* 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 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 REPLACE function to return the text string with a number of characters replaced.
* You can use the FINDB function if you have languages that use the double byte character set.
* The FINDB function is hidden from the intellisense but does exist.
* You can return the position of a double quote by using CHAR(34) instead.
* For the Microsoft documentation refer to support.office.com

 A
1=FIND("M","Miriam McGovern") = 1
2=FIND("m","Miriam McGovern") = 6
3=FIND("A","AAAAAAA",3) = 3
4=FIND("%","1       3%$%456") = 10
5=FIND(4,"1 2 3 4 5 6") = 7
6=FIND("B","A     B",1) = 6
7=FIND("middle","start middle end",1) = 7
8=FIND(CHAR(34),"my string with ""double quotes""") = 16
9=FIND("B","AAAAAA") = #VALUE!
10=FIND("b","a b c d e",5) = #VALUE!
11=FIND("A","AAAA",20) = #VALUE!
12=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 "A" in the text string "AAAAAAA" starting at character position 3.
4 - What is the position of the substring "%" in the text string "1       3%$%456".
5 - What is the position of the substring "4" in the text string "1 2 3 4 5 6".

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