What does it do?
Gets the position of a specific text within another text and allows wildcards * ?
=SEARCH(find_text, within_text, [start_num])
What it means:
=SEARCH(text to be searched, the source text, [starting position of the source text])
If you want to check where a specific text is located in the source text, it is very easy to search for the position using the SEARCH Formula!
You might be wondering on what makes it different from the FIND Formula. The SEARCH formula is case-insensitive when searching for text, and it also allows for the use of wildcard characters like * and ?
It is very cool when wildcard characters are used. The ? character represents any single character, while * represents any number of characters.
I explain how you can do this below:
STEP 1: We need to enter the SEARCH function in a blank cell:
STEP 2: The SEARCH arguments:
What is the text to be searched for?
There are a couple of flexible settings you can do in find_text:
- ? matches any single character while * matches any number of characters.
- For example, if we place in H?w, then we want to search for any 3-character text that starts with H and ends with w
- If we change it to H*w, then we want to search for any text that starts with H and ends with w
- If ever you want to match the question mark (?) or asterisk character (*) literally, you will have to add a tilde character (~) before the character. For example, ~? and ~*
Select the cell containing the text to be searched for. In our first example, we want to search for ‘x’ in the word ‘Excel’:
What is your source text?
Select the cell source text. So let’s select ‘Excel’ as our source text:
Where do you want to start searching in your source text?
You can leave this blank, it will default to 1 which means it will start looking from the first character of your source text. In our case, let us put in 1 to start searching from there:
=SEARCH(D9, C9, 1)
Apply the same formula to the rest of the cells by dragging the lower right corner downwards.
You can see that the matching is case insensitive! And you can see our wildcard characters matching in action!
How to Use the SEARCH Formula in Excel