What does it do?
Gets the position of a specific text within another text and allows wildcards * ?
Formula breakdown:
=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:
=SEARCH(
STEP 2: The SEARCH arguments:
Table of Contents
find_text
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’:
=SEARCH(D9,
within_text
What is your source text?
Select the cell source text. So let’s select ‘Excel’ as our source text:
=SEARCH(D9, C9,
start_num
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
Bryan
Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).
He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.