Function FIND (FIND) and function SEARCH (SEARCH) are very similar to each other. This example demonstrates the difference.
- Try to use the function FIND (FIND) to find the position of a substring in a string. As you can see in the figure, this function is case sensitive.
- Now test the function SEARCH (SEARCH) to find the position of the searched text in the string. This function is not case sensitive.
Note: The text “excel” has position 11 on this line, even if it is used in slightly different case (“Excel”).
- Function SEARCH (SEARCH) is more versatile. You can use wildcards when you use it.
Note: The question mark (?) matches exactly one character. An asterisk (*) matches a range of characters (zero or more).
- Another interesting feature of the functions FIND (FIND) and SEARCH (SEARCH) in that they have a 3rd extra argument. You can use this argument to specify the position (starting from the left) at which to start searching.
Note: The string “o” is found at position 5.
Note: The string “o” was found at position 7 (the search started at position 6).