SEARCH |
SEARCH(find_text, within_text [,start_num]) |
Returns the starting position of a substring within a larger text string (not case sensitive). |
find_text | The text string you want to find. |
within_text | The text in which you want to search for "find_text". |
start_num | (Optional) The character number in "within_text" at which to start searching (default is 1). |
REMARKS |
* This function is not case sensitive when searching for text strings. * For a case sensitive search, use the FIND function. * This function supports wildcards (? and *). * Wildcard character: ? = a single character. * Wildcard character: * = multiple characters. * Wildcard character: * cannot be used to test for a substring that ends with a particular character. Example 13. * To include the actual wildcard characters use a tilde prefix (~?), (~*) and (~~). * This function will always return the first instance of the text you want to find, reading from left to right. * If "find_text" does not appear in "within_text", then #VALUE! is returned. * If "start_num" > the length of "within_text", then #VALUE! is returned. * If "start_num" < 0, then #VALUE! is returned. * If "start_num" = 0, 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 FIND function to return the position of a substring within a larger text string. This is case sensitive * You can use the MID function to return the characters from the middle of a string. * You can use the REPLACE function to return a text string with a number of characters replaced. * You can use the SUBSTITUTE function to return the text string with a substring substituted for another substring. * You can use the SEARCHB 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. * For the Microsoft documentation refer to support.microsoft.com * For the Google documentation refer to support.google.com |
|
1 - What is the position of the first instance of the substring "e" in the text string "Statements" starting at character position 1. 2 - What is the position of the first instance of the substring "e" in the text string "Statements" starting at character position 4. 3 - What is the position of the first instance of the substring "e" in the text string "Statements" starting at character position 6. 4 - What is the position of the first instance of the substring "S" in the text string "Statements" starting at character position 1. 5 - What is the position of the first instance of the substring "s" in the text string "Statements" starting at character position 1. 13 - This function always looks for substrings and will automatically prefix and append an asterisk to your "find-text". |
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top