When we want results that are less than exact, we can use Wildcards. Wildcards like Asterisk (*) and Question mark (?) have unique applications. This systematic tutorial will walk all levels of Excel users on how to use wildcards.
Figure 1 – How to use wildcard characters
The Asterisk (*) Wildcard
This is a popular wildcard. We can use the asterisk wildcard to assume any value for a set of characters. If we use the asterisk at the end of a text string like “Cu*”, it can represent Cut, Cup, Cue, etc. Similarly, if we use it before a string like “*2”, it will return all values that end with 2.
To use the asterisk, we will do the following.
- We will highlight Column B by taking our cursor to the top of the column and click on it
Figure 2 – Setting up wildcards data
- We will go to the Data tab and click on Filter
Figure 3 – Click on Data tab and Filter
Figure 4 – Filter drop-down applied
- We can filter all branches that end with ‘S’ by doing the following
- We will click on the drop-down arrow of Column B and type ‘*s’
Figure 5 – Filter tool
- We will click OK
Figure 6 – Result of the asterisk character returning branches ending with ‘S’
- We can do the same procedure for Column C. Here, we will search for ‘Br*’
Figure 7 – Result of the asterisk character returning Owners Beginning with ‘Br’
Note – This procedure is not case-sensitive
The Question mark (?) Wildcard
When using the Question mark wildcard, the goal is to be more specific in our search while we are yet not exact. We will use the data below.
Figure 8a – How to use the Question mark wildcard
- After applying the filter, we will insert *ci?y* in the search box. The question mark character specifies that only cells containing the letter C, letter I, a letter before letter Y, represented by the question mark, and finally, letter Y is returned. The asterisk wildcard is used to return the characters before before C and after Y
Figure 8b – How to use the Question mark wildcard