Using ? and * as Wildcard Characters in Microsoft Excel

The video shows how you can substitute ? for a single unknown character in Microsoft Excel, or * for an unknown section of text. These wildcard characters can be used in Excel's Find/Replace function, in filters, or in some Excel formulas. In the case of an asterisk, Excel will return a match if there are no characters in the section of text covered by the wildcard. So a search for "a*" will match with a cell containing "a". Note that if you wish to search for text containing a question mark or asterisk, you must precede them using a tilde; so to find "why?", you should search for "why?" The tilde is known as an escape character and, if you ever wanted to search for "ab", you would need to enter an additional tilde and search for "a~~b".

The rule for using wildcard characters in Excel formulas is that they should be used in functions that attempt to match entire cell's text. Examples include MATCH, VLOOKUP, XLOOKUP. So MATCH("a*,A1:A5,0) would return '1' if cell A1 contained "abc" because the first cell in the range reads "a" followed by some other characters. If you are using formulas that look within the text string such as FIND, Excel will simply treat a '?' as a question mark or an '*' as an asterisk. That's because a lot of wildcard finds become meaningless if you're not looking to match an entire cell e.g. the potential use of a wildcard in '=FIND("*sales*",A1) is simply written as '=FIND("sales",A1) without any wildcard characters.

The find/replace function has a 'Match entire cell contents' checkbox. If you are not looking to match an entire cell, then there is no point conducting a wildcard search for e.g. "sales*" because Excel will automatically look for any cell containing the word "sales". Likewise, if you are using filters, Excel can you save you the effort of using * wildcards because you can select text filters for cells that begin with, end with, or contain. These alternatives have reduced the number of situations in which wildcard characters add value.

By Ed Bolton, founder of Excel4Business Ltd. Last reviewed October 2026.