Function Problems

How to Use SUMIF and SUMIFS with Wildcards to Total Selected Items in Excel

Kushani NimanthikaKushani Nimanthika Nov 10, 2026 868 views

Question details

The user wants to calculate the total amount for specific items that meet a text-based condition using SUMIF or SUMIFS functions.

How to Use SUMIF and SUMIFS to Total Selected Items in Excel
Product
Excel
Device & OS
not provided
Scenario
Summing values in a table where the item names match a specific text pattern, such as containing the letter 'e'.
Observed behavior
The user needs a formula to correctly apply wildcard criteria to sum the corresponding amounts for items like Bread, Donuts, Cookies, and Cakes.
Before you start

Ensure your data is organized in a structured format, preferably as an Excel Table, with clear column headers for the items and the amounts you wish to sum.

Solution 1Recommended

Use SUMIFS with a Wildcard Criterion

Apply the SUMIFS function using asterisk wildcards to sum values based on partial text matches.

The SUMIFS function is highly versatile and allows you to sum values based on one or multiple criteria. By incorporating wildcards, you can easily filter and sum items that contain specific characters without needing exact matches.

1
Identify your table and columns

Ensure your data is formatted as an Excel table (e.g., named Table1) with an [Items] column for text and an [Amount] column for numbers.

2
Enter the SUMIFS formula

Click on the cell where you want the total to appear and type =SUMIFS( to begin the formula.

3
Define the sum range and criteria range

Add the sum range Table1[Amount] followed by a comma, then the criteria range Table1[Items] followed by another comma.

4
Add the wildcard criterion

Type "*e*") to match any item containing the letter 'e'. The complete formula should look like =SUMIFS(Table1[Amount],Table1[Items],"*e*"). Press Enter to get the result.

Use SUMIFS with a Wildcard Criterion
Wildcard Usage: The asterisk (*) represents any number of characters. Placing it before and after a letter (like *e*) means the text can contain 'e' anywhere in the string.
Master Data Analysis with WPS Spreadsheet

Easily Calculate Conditional Sums in WPS Office

WPS Spreadsheet fully supports advanced functions like SUMIF and SUMIFS, including wildcard criteria. You can seamlessly manage, analyze, and calculate your data with high efficiency and a familiar interface.

  1. 1. Open your spreadsheet: Launch WPS Office and open your workbook containing the data table.
  2. 2. Use the Function Wizard: Click the 'Formulas' tab, select 'Insert Function', and search for SUMIFS.
  3. 3. Input your parameters: Fill in the Sum_range, Criteria_range1, and Criteria1 (e.g., "*e*") in the dialog box, then click OK.
Fully compatible with Microsoft Excel formulas and wildcardsIntuitive function insertion wizard to help build complex formulasFree and lightweight alternative for data analysisSupports structured table references for dynamic calculations
microsoft office alternative - wps office

Frequently Asked Questions

What is the difference between SUMIF and SUMIFS?

SUMIF is designed to sum values based on a single condition, whereas SUMIFS can evaluate multiple conditions across different ranges before summing the values. SUMIFS is generally recommended as it is more flexible, even for single conditions.

Can I use other wildcards besides the asterisk (*)?

Yes, you can use a question mark (?) to represent a single character. For example, the criterion "C?ke" would match "Cake" or "Coke", but it would not match "Cookie".

Why is my SUMIFS formula returning 0?

This usually happens if the criteria text doesn't match any cells, if there are hidden trailing spaces in your data, or if the sum range and criteria range are not the exact same size.

How do I sum items that exactly match a specific word?

To sum items that exactly match a word, simply remove the wildcards from your criteria string. For example, use =SUMIFS(Table1[Amount], Table1[Items], "Bread").