English
/

SUMIF vs SUMIFS, How to Sum With One or More Conditions

Last edited Nov 6, 2026 · 4 min read

SUMIF adds values that meet one condition; SUMIFS adds values that meet one or more conditions, with every condition required to match. Excel and Google Sheets support both functions, but the sum range comes third in SUMIF and first in SUMIFS.

On this page▾
  1. What each function does
  2. Microsoft's example, rebuilt
  3. Summing a date range
  4. Three problems to check
  5. Comparison operators you can use
  6. Frequently asked questions
  7. What is the difference between SUMIF and SUMIFS?
  8. Can I use SUMIFS with only one condition?

What each function does

Microsoft's documentation describes SUMIFS as adding all of its arguments that meet multiple criteria. Its syntax is:

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

You name the column to add first, then one or more pairs: a range to test and the condition to test it against. Microsoft notes you can enter up to 127 range and criteria pairs. Google Sheets uses the same structure, and its help page adds a note: to be added, a row must meet all the criteria.

SUMIF handles a single condition, and Microsoft's page flags the trap directly: the sum range is the first argument in SUMIFS but the third argument in SUMIF. Microsoft calls this a common source of problems, especially when you copy one formula and edit it into the other.

Microsoft's example, rebuilt

Microsoft's SUMIFS page uses this table in A1:C9:

Quantity Sold (A) Product (B) Salesperson (C)
5 Apples Tom
4 Apples Sarah
15 Artichokes Tom
3 Artichokes Sarah
22 Bananas Tom
12 Bananas Sarah
10 Carrots Tom
33 Carrots Sarah

Its two documented formulas both return the numbers Microsoft gives when entered in Excel:

=SUMIFS(A2:A9, B2:B9, "=A*", C2:C9, "Tom")
=SUMIFS(A2:A9, B2:B9, "<>Bananas", C2:C9, "Tom")

The first returns 20: products starting with A (the asterisk is a wildcard for any characters) sold by Tom, which is 5 apples plus 15 artichokes. The second returns 30: everything Tom sold except bananas, 5 plus 15 plus 10.

Now compare a single-condition total, everything Tom sold, written both ways:

=SUMIF(C2:C9,"Tom",A2:A9)
=SUMIFS(A2:A9,C2:C9,"Tom")

Both return 52 (5 + 15 + 22 + 10). Same answer, different order. If you only remember one function, SUMIFS works for one condition too, which removes the need to remember two argument orders.

Summing a date range

The most useful everyday pattern is a total between two dates. Suppose a small orders table has dates in J2:J7, the sales rep in K2:K7, the channel in L2:L7 and the amount in M2:M7:

Date Rep Channel Amount
Sep 28, 2026 Ana Online 1,200
Sep 30, 2026 Ben Store 800
Oct 1, 2026 Ana Store 450
Oct 3, 2026 Ana Online 975
Oct 6, 2026 Ben Online 620
Oct 9, 2026 Ana Online 300

For this example, enter the table's dates and the boundary dates as spreadsheet date values, not text or timestamps. Put the start date in O1 (October 1, 2026) and the end date in O2 (October 31, 2026). Then:

=SUMIFS(M2:M7,J2:J7,">="&O1,J2:J7,"<="&O2)

This returns 2,345, the four October orders. Notice that the same date column appears twice, once for each boundary. That is allowed, and it is how you build a "between" condition.

The ">="&O1 part matters. The ampersand joins the comparison operator to the value in O1. If you type ">=O1" inside the quotes instead, O1 is part of the criterion's text, not a reference to the date stored in that cell. It does not apply the intended date boundary.

Add more pairs to narrow it down. Put "Ana" in O3:

=SUMIFS(M2:M7,J2:J7,">="&O1,J2:J7,"<="&O2,K2:K7,O3)
=SUMIFS(M2:M7,J2:J7,">="&O1,J2:J7,"<="&O2,K2:K7,O3,L2:L7,"Online")

The first returns 1,725 (Ana's October orders: 450 + 975 + 300). The second returns 1,275 (only her online ones: 975 + 300). Keeping the dates and the rep's name in cells, rather than typing them into the formula, lets you change the report by editing one cell.

Three problems to check

Missing quotation marks around text. Microsoft says to enclose text criteria in quotation marks. Writing =SUMIFS(A2:A9,C2:C9,Tom) without quotes makes Excel treat Tom as a name. If that name is not defined in the workbook, the result is #NAME?, not 0. Use "Tom" to match the person's name.

Ranges of different sizes. Microsoft states the criteria range must contain the same number of rows and columns as the sum range. A formula like =SUMIFS(A2:A9,B2:B8,"Apples"), where one range stops a row early, returns #VALUE!.

TRUE and FALSE in the sum column. Microsoft notes that TRUE counts as 1 and FALSE as 0 when they appear in the sum range, which can produce unexpected totals if a column mixes checkboxes and numbers.

Counting cells instead of summing them is covered in COUNT vs COUNTA vs COUNTBLANK in Excel and Google Sheets.

Comparison operators you can use

Criteria can be a number, a cell reference, text, or a comparison in quotes. Microsoft's examples include 32, ">32", B4, "apples" and "32". For example, =SUMIFS(A2:A9,A2:A9,">10") adds only quantities above 10 in the first table, which gives 82 (15 + 22 + 12 + 33). The question mark wildcard matches exactly one character, so "To?" matches "Tom".

Frequently asked questions

What is the difference between SUMIF and SUMIFS?

SUMIF tests one condition; SUMIFS tests one or more, and a row is added only if it meets all of them. The argument order also differs: the sum range is the third argument in SUMIF but the first in SUMIFS. Microsoft calls this a common source of problems.

Can I use SUMIFS with only one condition?

Yes. =SUMIFS(A2:A9,C2:C9,"Tom") returns the same 52 as =SUMIF(C2:C9,"Tom",A2:A9) in the example above.

Sources

  1. Microsoft Support, SUMIFS function
  2. Google Docs Editors Help, SUMIFS function
  3. Microsoft Support, How to correct a #NAME? error
  4. Microsoft Support, Cell references and defined names in criteria

About this guide

Howlane operator · Checked against the official sources listed above. It is general information, not professional advice.

AboutEditorial standardsCorrectionsReport an error

Edit history

  • Updated
  • Updated
  • Updated
  • Updated
  • Published