SUMIF with Wildcards (Partial Match)

Excel Formulas › Sum

All versionsSUMIF

Total only the rows whose label contains a word — all “North” regions, every product with “Pro” in the name. Wildcards in SUMIF make the criteria a pattern.


Quick formula: sum amounts where the label contains “north”:
=SUMIF(labels, "*north*", amounts)
The * wildcards match any characters before and after “north,” so partial matches add up.

Functions used (tap for the full reference guide):

The example

All “North” regions summed.

AB
1RegionSales
2North-East100
3North-West150
4*north* total250

The formula

Sum on a contains pattern:

=SUMIF(labels, "*north*", amounts) // any label containing north

How it works

Wildcards turn the criteria into a pattern:

  1. * matches any run of characters; ? matches a single one.
  2. "*north*" means “contains north”; "north*" means “starts with.”
  3. SUMIF adds the amounts wherever the label matches the pattern (case-insensitive).
  4. Reference a cell for the term: "*"&E1&"*" makes it interactive.

SUMIFS too: wildcards work in SUMIFS criteria for multi-condition sums. To match a literal * or ?, escape it with a tilde (~*).

Try it: interactive demo

Live demo

Lines “label,amount”; sum those containing the term.

Total:

Variations

Starts with

Prefix only:

=SUMIF(labels, "north*", amounts)

From a cell

Interactive:

=SUMIF(labels, "*"&E1&"*", amounts)

SUMIFS

With another condition:

=SUMIFS(amt, region, "*north*", yr, 2026)

Pitfalls & errors

Exact-match only by default. Without wildcards, SUMIF matches the whole label; add * for “contains.”

Literal * or ?. Escape with a tilde (~*) to match the actual character.

Numbers aren’t text. Wildcards work on text labels, not numeric criteria.

Practice workbook

📊
Download the free SUMIF with Wildcards (Partial Match) practice workbook
A wildcard SUMIF sheet with the starts-with, cell, and SUMIFS variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I use SUMIF with a partial match in Excel?
Wrap the term in wildcards: =SUMIF(labels, "*north*", amounts) sums rows whose label contains "north".
How do I sum labels that start with a term?
Put the wildcard after: =SUMIF(labels, "north*", amounts).
Do wildcards work in SUMIFS?
Yes — wildcard criteria work in SUMIFS for multi-condition sums too.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Sum if contains · SUMIFS multiple criteria · Lookup with wildcards

Function references: SUMIF