The result is $30.45, the sum of Shampoo ($9.50), Shaving Cream (11.95), and Shaving Soap ($9.00). Note the SUMIF function is not case-sensitive.

### Wildcards

Certain Excel functions like SUMIF and SUMIFS support the wildcard characters “?” (any one character) and “*” (zero or more characters), which can be used in criteria. These wildcards allow you to create criteria such as “begins with”, “ends with”, “contains 3 characters”, etc. as shown in the table below: Note that wildcards are enclosed in double quotes ("") when they appear in criteria.

### SUMIF solution

The generic syntax for the SUMIF function looks like this: In this example, the formula to sum Price when Product begins with “sha” is: The criteria “sha*” means cells that begin with “sha”. Notice you must enclose the text and the wildcard in double quotes (""). Also note that SUMIF is not case-sensitive. The criteria “sha*” will match “Shampoo”, or “SHAMPOO”.

### SUMIFS solution

You can also use the SUMIFS function to sum if cells begin with. SUMIFS can handle multiple criteria, and the order of the arguments is different from SUMIF. The generic syntax for a single condition looks like this: Notice that the sum range always comes first in the SUMIFS function. The equivalent SUMIFS formula for this example is: The criteria used with SUMIFS is the same as that used in SUMIF, with the text and wildcard are both enclosed in double quotes (""). Like SUMIF, the SUMIFS function is not case-sensitive.

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.