In this lesson, we’ll be taking a look at FIND and SEARCH, which find the position of a given string of text within another string of text. They are similar, but have one important difference.
Both functions consist of two arguments, and one optional one. The text that we’re looking for, where we want to search, and if we want, where in the text we want to begin counting.
We’ll start by typing Equals, FIND, the text we want in quotation marks, and where we want to search. The FIND function is case-sensitive, so we will get an error looking for an upper case S, so we’ll change it to lower case.
The first lower-case S is in position number 7.
We can use the third argument in the function, to start counting at position number 8 instead, which means that the next lower-case S is at position number 17.
The SEARCH function allows us to use what are called wildcard characters. For example, we can use the asterisk to search for the text ESY, and ISH, with any amount of characters in between.
Now, if we change the text in such a way that the function still applies, nothing is changed.
Note that the SEARCH function is case-insensitive.