How to SUM if cell contains an asterisk (*) character in Excel

In this article, we will learn How to SUM if cell contains an asterisk (*) character in Excel.


In simple words, while working with data tables, sometimes we need to get the sum of the cells where the character itself is a wildcard. Criteria cannot be processed as if its functionality intersect with matching required value. Learn more about wildcard characters.

How to solve the problem?

For this article we will be required to use the SUMIF function. Now we will make a formula out of the mentioned function and wildcard characters. Here we are given the range, sum_range and a value as criteria and we need to match the criteria values and get the sum of corresponding values from the dataset.

Generic formula:

= SUMIF ( range, "*~**" , sum_range )

range : range to match with criteria range

"*~**" : criteria

sum_range : range where sum is required


All of these might be confusing to understand. So, let's test this formula via running it on the example shown below.

Here we have a dataset (A1:D50) having the order date, city, product & its quantity.

Firstly,  we need to find the sum of quantity where the product matches the asterisk value mentioned in the separate cell. Now we will use the following formula to get the sum

Use the Formula:

= SUMIF (B4:B11 , "*~**" , D4:D11)


  • "*~**" , The tilde (~) character is used when you need to catch the predefined wildcard character itself.
  • Here ~ character used to catch * (asterisk) character.
  • * at the start and end is used as wildcard to match any number of character preceding or following the * (to match) character
  • SUMIF function matches the criteria in B4:B11 range and returns the sum for the corresponding values in D4:D11 range.

Here the range is given as cell reference and criteria range is given using quotes. Press Enter to get the sum.

As you can see in the above snapshot that sum of price having asterisk character in cell is $150.

Here are some observational notes shown below.


  1. The formula only works with numbers.
  2. The formula works only when there are no duplicates in the lookup table.
  3. The SUMIF function considers non - numeric values as 0s.
  4. The SUMIF function considers logic value TRUE as 1 and False as 0.
  5. The argument array must be of the same length else the function returns error.

Hope this article about how to Find the partial match number from data in Excel is explanatory. Find more articles on SUMIF functions here. If you liked our blogs, share it with your fristarts on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at

Related Articles

How to use the SUMPRODUCT function in Excel: Returns the SUM after multiplication of values in multiple arrays in excel.

SUM if date is between : Returns the SUM of values between given dates or period in excel.

Sum if date is greater than given date: Returns the SUM of values after the given date or period in excel.

2 Ways to Sum by Month in Excel: Returns the SUM of values within a given specific month in excel.

How to Sum Multiple Columns with Condition: Returns the SUM of values across multiple columns having condition in excel

How to use wildcards in excel : Count cells matching phrases using the wildcards in excel

Popular Articles

50 Excel Shortcut to Increase Your Productivity : Get faster at your task. These 50 shortcuts will make you work even faster on Excel.

How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.

How to use the COUNTIF function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.

How to use the SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.