Templates, guides & honest tool reviews for small business

Monday, November 30, 2026

SUMIFS in Excel: Add Values That Meet Several Conditions

Section: Excel & Google Sheets

SUMIFS in Excel - explanatory illustration for SUMIFS in Excel
Illustration: SUMIFS in Excel

SUMIFS in Excel adds the values that meet several conditions at once. =SUMIFS(A2:A9,B2:B9,"=A*",C2:C9,"Tom") adds the quantity of every product starting with A sold by Tom, and returns 20 on Microsoft's sample data. It is the function behind most monthly reports, because a report is usually a total for one person, one region or one month, and one condition is rarely enough. This guide covers the argument order, the difference from SUMIF, criteria written as text, wildcards, dates, and the reasons a total comes back as zero.

What SUMIFS does

Microsoft describes SUMIFS as adding all of its arguments that meet multiple criteria, and gives the example of counting retailers in one zip code whose profit is above a set figure. The pattern is always the same: a range of numbers to add, then pairs of a range to test and the test to apply.

Every pair has to be true at the same time. Two pairs mean both conditions, three mean all three, and the function stops being readable somewhere around four, which is the point to consider a pivot table instead.

The syntax and the argument order

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

  • sum_range comes first and is the range of numbers that will be added.
  • criteria_range1 is the first range to test, and criteria1 is the test applied to it.
  • Further pairs are optional, and Microsoft allows up to 127 of them.

The order is the thing to memorise. The range you add comes first in SUMIFS and third in SUMIF, which Microsoft flags in its own best practices as a common source of problems when someone copies one formula and edits it into the other.

SUMIFS argument order - explanatory illustration for SUMIFS in Excel
SUMIFS argument order (explanatory illustration, not a software screenshot).

Microsoft's example, checked

The sample data is eight rows of quantity, product and salesperson: 5 Apples for Tom, 4 Apples for Sarah, 15 Artichokes for Tom, 3 Artichokes for Sarah, 22 Bananas for Tom, 12 Bananas for Sarah, 10 Carrots for Tom and 33 Carrots for Sarah.

  • =SUMIFS(A2:A9,B2:B9,"=A*",C2:C9,"Tom") returns 20, which is 5 plus 15: the two products that start with A, sold by Tom.
  • =SUMIFS(A2:A9,B2:B9,"<>Bananas",C2:C9,"Tom") returns 30, which is 5 plus 15 plus 10: everything Tom sold except bananas.

I added both columns by hand before writing them down, and the two results match the published figures. That check is worth doing on your own data too, because a SUMIFS that is off by one row is invisible in a total.

Microsoft's SUMIFS example - explanatory illustration for SUMIFS in Excel
Microsoft's SUMIFS example (explanatory illustration, not a software screenshot).

Criteria are text, even when they are numbers

A criterion is a string. That is why ">32" works, why "<>Bananas" excludes a product, and why a plain number like 32 also works, because Excel converts it. What does not work is a comparison without quotes around it, and what confuses people is that a cell reference belongs in the same position without any quotes at all.

The forms you will use most are an exact value, a comparison with an operator, a cell reference, and a wildcard pattern. Microsoft's own summary of the rule is simple: quote the text criteria, and do not quote a cell reference.

Criteria written as text - explanatory illustration for SUMIFS in Excel
Criteria written as text (explanatory illustration, not a software screenshot).

Wildcards and the tilde

An asterisk matches any sequence of characters and a question mark matches any single character, which is how "=A*" finds every product beginning with A. Microsoft notes that "To?" matches names that begin with To and end with one more character.

When you need a literal asterisk or question mark, put a tilde in front of it. Without the tilde, a criterion of "A*" searches for a pattern, not for the two characters A and star.

Dates and numbers as criteria

Dates need the comparison and the date joined into one string, because a criterion is text. A total for everything from 1 January 2026 onwards looks like ">="&DATE(2026,1,1), and a range between two dates uses two pairs, one for the start and one for the end. Typing the date straight into the formula as text works only if the text matches your regional date format, which is why the DATE version is safer in a workbook other people open.

Numbers behave the same way: ">1000" is text that Excel reads as a comparison, while a cell reference to 1000 needs ">"&F2 to become a comparison rather than an equality test.

Ranges must line up

Microsoft states the rule plainly: the criteria range must contain the same number of rows and columns as the sum range. Excel does not always complain when they differ, it just reads the wrong rows and returns a number that looks plausible.

In practice, keep every range the same height and start on the same row. If the sheet grows, use a whole-column reference or, better, an Excel Table, where the ranges expand on their own and the formula reads as column names instead of addresses.

Why the total is zero

Microsoft's first common problem is a zero where a total was expected, and the usual cause is text criteria without quotation marks. The second is a sum range holding TRUE and FALSE, where TRUE counts as 1 and FALSE as 0, so the total quietly means something else.

Two more causes are worth adding from experience. Numbers stored as text do not match a numeric criterion, so a column pasted from another system can look right and total to nothing. And trailing spaces in a name make "Tom" and "Tom " two different people, which is a job for TRIM on the source column.

Why SUMIFS returns 0 - explanatory illustration for SUMIFS in Excel
Why SUMIFS returns 0 (explanatory illustration, not a software screenshot).

Common problems

  • A total of zero. Criteria missing their quotes, or the criteria range pointing at the wrong column.
  • A total that is too small. Numbers stored as text in the sum range, or ranges of different heights.
  • A total that is too large. A wildcard doing more than you meant, such as "A*" also matching a product called Axle.
  • A date criterion that matches nothing. The dates in the column are text, not dates. Check the alignment: dates sit right, text sits left.
  • #VALUE! after an edit. A range reference was typed where a criterion belongs, or the two were swapped.
  • A formula nobody can read. More than four conditions. Move the data into a pivot table or add a helper column.

Questions and answers

What is the difference between SUMIF and SUMIFS?

SUMIF takes one condition and puts the sum range third. SUMIFS takes several conditions and puts the sum range first.

Can SUMIFS add a column other than the one it tests?

Yes, and that is the normal case: test the product and the salesperson, add the quantity.

How many conditions can I use?

Up to 127 range and criteria pairs, though readability gives out long before that.

Does SUMIFS work in Google Sheets?

Yes, with the same argument order. Check Google's function page for the exact behaviour of wildcards before you copy a formula across.

Can SUMIFS sum a whole column?

It can, but whole-column references slow a large workbook down. Use a table or a fixed range that covers the data you have.

Official references

العربية