LiveFlow raises $13.5 million Series A led by New York-based Valar Ventures and launches LiveFlow Next to revolutionize accounting!
Read More
Arrow
Back to guides
Google Sheets Tips

How to Use Wildcard Characters in Google Sheets

In this article, you will learn what wildcard characters are and how to use them in Google Sheets. You can use these wildcard characters to replace other characters. The partially replaced value can be a search keyword for a partial match in some functions such as COUNTIF, COUNTIFS, SUMIF, SUMIFS, and Conditional Formatting.

There are three types of a wildcard -  “*”: asterisk, “?”: question mark, and “~”: tilde.

How do you use wildcard characters?

Understand what function each of the three signs has.

“?”: the question mark replace and represent any single character.

“*”: the asterisk can represent and take the place of any number of characters.

 “~”: the tilde works differently from the other two wildcard characters. The tilde cancels the functions of the other two symbols, “?” and “*”,  as wildcard characters and thus makes Google Sheets functions recognize the symbols as standard texts.

Assume you look at an inventory list and want to count the total number of inventory products that meet a specific criterion with the SUMIF function. 

(i) Product type starts with “A-”

In this case, the standard of the SUMIF formula should be “A-*”. By putting the asterisk at the end of the text, this formula looks for a Product Type that begins with “A-”, followed by any number and type of characters such as “A-C 60***”.

The SUMIF function sums up the number of inventory of items highlighted in light red in the picture and provides 840.

How to use the asterisk 
How to use the asterisk in Google Sheets

(ii) Product Type starts with “?B”- Note: The question mark is used as a general text

In this example, the criterion should be “~?B*”. By putting the tilde next to the question mark to the left, the question mark is no longer a wildcard but just a symbol. The SUMIF formula adds up the volume of the inventory for times highlighted in light yellow in the screenshot and provides 320.

Use the question mark and the asterisk together 
How to use the question mark and the asterisk together in Google Sheets

Save hours formatting your next financial spreadsheet!
100+ templates, all free to use.
Free Spreadsheet Templates

(iii) Product Type includes “A-X-C” - Note: X represents any single character here

The search keyword should be “*A-?-C*”. As “?”, the question mark can represent any single value or character. It should be put where any single character is acceptable. The SUMIF formula gives 160 as it picks up only one item, meeting the criterion.

Use the questions mark as a wildcard character
How to use the questions mark as a wildcard character in Google Sheets

(iv) Product Type includes “??” - Note: The double question marks are used as general texts

The double question marks need to be treated as general characters here. So, you need to put a tilde next to each question mark to the left to cancel their effect as wildcards. Also, you have to enclose them with asterisks so that the double question marks can have any number of characters before and/or after them.

That said, the criteria is “*~?~?*”. The SUMIF returns 600 as a total inventory amount of the product highlighted in the screenshot below.

Use tildes mark against questions marks 
How to use tildes mark against questions marks in Google Sheets

(v) Product Type ends with “60***”- Note: The asterisks are used as general texts

Similar to the fourth example, you need to have the formula recognize the asterisks as general symbols. To do so, you can put on tilde next to each asterisk to the left. As any number of characters can be ahead of this keyword, you need to add an asterisk next to 60 to the left. 

The criterion looks “*60~*~*~*”. The returned result is 510 as the total inventory amount of three types of products highlighted in the following picture.

Use tildes mark against asterisks
How to use tildes mark against asterisks in Google Sheets

Learn how LiveFlow can save you hours a month on financial reporting!
Just 30 minutes can change the way your business operates forever.
Book a Demo

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Cta Photo

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how!

Get personal help

We guarantee you personal help on chat or Zoom within maximum 6 hours between 9am and 10pm EST.
Blue Tick
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below

Supercharge your financial reporting today

See LiveFlow in action and discover how to streamline your workflows.