If Excel recognizes the asterisk and the question mark as wildcards by default, how do we keep Excel from doing so in those cases where these characters are actually a part of our string?
We use the tilde, or ‘~’.
Anytime we want the asterisk or question mark to not be a wildcard, we simply place a tilde just before it.
Consider the following example where we have a table of values.
Let’s see what happens when we use the asterisk as a wildcard to filter all values that have any number of characters following an asterisk character in its string.
Based on what we have already discussed, we shouldn’t be surprised that this is our result.
But what we really want to do is isolate the value like ‘How?*’.
In order to do this, we have to place a ‘tilde’ prior to our second asterisk in the filter.
The first asterisk in our search term is the wildcard while the second asterisk is an actual character since the tilde precedes it.
Therefore, our search finds only values that end with an asterisk (in this case ‘How?*’).
Note: This same concept holds for the question mark wildcard.