Menu

SUMIFS in Excel: Sum with Multiple Criteria

=SUMIFS(C2:C7,A2:A7,"North",B2:B7,"Apple") adds the sales in C2:C7 where the region is North and the product is Apple. Date ranges, OR logic and optional filters, on live sheets.

Every sheet on this page is live: change a number or a formula and it recalculates.

=SUMIFS(C2:C7,A2:A7,"North",B2:B7,"Apple") adds the sales in C2:C7 on the rows where column A is North and column B is Apple. The range to add comes first, then one range and condition pair for every condition.

North apples
F2
ABCDEF
1RegionProductSalesConditionTotal
2NorthApple120North, Apple150
3SouthPear45North, over 50200
4NorthPear80North230
5EastApple55
6SouthApple200
7NorthApple30
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Two rows are North and Apple, 120 and 30, so F2 shows 150. F3 uses the sales column as both the sum range and a criteria range: North rows over 50. F4 has a single condition and works like SUMIF. Change B4 to Apple and F2 grows by 80.

SUMIFS syntax

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
  • sum_range is the cells to add, and it comes first. In SUMIF it comes last: =SUMIF(A2:A7,"North",C2:C7). Mixing the two orders is a common SUMIFS mistake. If you copy a SUMIF and add a condition, move the sum range to the front.
  • Each condition is a pair: a range and a criterion, up to 127 pairs. The criteria work like SUMIF's: "North", ">50", "*apple*", "<>", or a cell joined to an operator, ">="&G2.
  • A row is added only when every condition is true.
  • Every range must be the same size, or SUMIFS returns #VALUE!.

SUMIFS works with a single condition too, and writing it that way means a second condition can be added later without reordering the arguments.

SUMIFS with a date range

To total one month, or any period, use the date column twice: once with the start date, once with the end date. Keep the dates in cells.

Sales between two dates
G4
ABCDEFG
1RegionProductSalesDateSettingValue
2NorthApple1202026-01-05Start2026-02-01
3SouthPear452026-01-12End2026-02-28
4NorthPear802026-02-03Total135
5EastApple552026-02-18North only80
6SouthApple2002026-03-02
7NorthApple302026-03-20
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

February has two orders, 80 and 55, so G4 shows 135, and G5 keeps only the North one. Change G3 to 2026-03-31 to take in March. If the dates carry times, "<="&G3 stops at 0:00 on the last day: use "<"&G3+1 as the end condition so orders later that day are counted.

To total a whole month from one date in a cell, let EOMONTH find the last day: =SUMIFS(C2:C7,D2:D7,">="&G2,D2:D7,"<="&EOMONTH(G2,0)).

SUMIFS with OR

The conditions in SUMIFS are always joined with AND. For North or South, give the region condition a list in braces: SUMIFS returns one total per item and SUM adds them.

North or South
F2
ABCDEF
1RegionProductSalesConditionTotal
2NorthApple120North or South475
3SouthPear45North or South, Apple350
4NorthPear80Two SUMIFS475
5EastApple55
6SouthApple200
7NorthApple30
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

F2 and F4 both give 475, everything except the East row. F3 combines the OR on regions with an AND on the product. Put the list on one criterion only: two lists in one SUMIFS pair their items position by position instead of trying every combination.

SUMIFS with blank criteria: an optional filter

A report often has filter cells that the reader may leave empty to mean "all". An empty cell used as a criterion does not mean "anything": Excel reads it as 0, which matches nothing in a text column. Swap it for the wildcard "*", which matches any text. Pick a region and a product from the lists, or clear them.

Optional filters
G4
ABCDEFG
1RegionProductSalesFilterValue
2NorthApple120RegionNorth
3SouthPear45Product
4NorthPear80Total230
5EastApple55
6SouthApple200
7NorthApple30
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

With North picked and no product, G4 adds every North row: 230. Pick Apple in G3 and it drops to 150; clear G2 and it adds Apple from every region. "*" matches text only, so this works for text columns; a column of numbers needs a range instead, ">="&min and "<="&max.

To add the rows where a column is empty or filled, use "" and "<>" as the criteria. With a Paid date in column D, =SUMIFS(C2:C7,A2:A7,"North",D2:D7,"") adds the North sales that are not paid yet.

Practice: SUMIFS

Your turn: South apples
F2
ABCDEF
1RegionProductSalesConditionTotal
2NorthApple120South, Apple
3SouthPear45
4NorthPear80
5EastApple55
6SouthApple200
7NorthApple30
8SouthApple75
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Your turn: Add up the sales where the region is South and the product is Apple. Write the formula in F2.

Your turn: North sales in a period
G4
ABCDEFG
1RegionProductSalesDateSettingValue
2NorthApple1202026-01-05Start2026-01-10
3SouthPear452026-01-12End2026-03-05
4NorthPear802026-02-03Total
5EastApple552026-02-18
6SouthApple2002026-03-02
7NorthApple302026-03-20
8NorthPlum652026-03-01
Click a cell to see its formula. Change a number or a formula and the sheet recalculates.

Your turn: Add up the North sales dated from G2 to G3, both days included. Write the formula in G4.

SUMIFS vs SUMIF vs SUMPRODUCT

You needUse
One conditionSUMIF(range,criteria,sum_range) or SUMIFS with one pair
Several conditions, all trueSUMIFS(sum_range,range1,criteria1,range2,criteria2)
Either of several values in one columnSUM(SUMIFS(sum_range,range,{"a","b"}))
A condition on a calculation (month of a date, one column compared with another, price times quantity)SUMPRODUCT
The same conditions, but a countCOUNTIFS

If a SUMIFS returns 0, check each condition alone with COUNTIFS on the same ranges: the condition whose count is 0 is the one that never matches, usually because of a trailing space, a number stored as text, or a cell written inside the quotes (">=G2" instead of ">="&G2).

Frequently Asked Questions

What is the difference between SUMIF and SUMIFS?

SUMIF takes one condition and puts the sum range last: =SUMIF(A2:A7,"North",C2:C7). SUMIFS takes any number of conditions and puts the sum range first: =SUMIFS(C2:C7,A2:A7,"North",B2:B7,"Apple"). With one condition both give the same total.

How do I use SUMIFS with a date range?

Use the date column twice, with a start and an end: =SUMIFS(C2:C7,D2:D7,">="&G2,D2:D7,"<="&G3) adds the sales dated from G2 to G3, both included.

Can SUMIFS use OR logic?

Not directly: its conditions are joined with AND. Give one criterion a list and add the results: =SUM(SUMIFS(C2:C7,A2:A7,{"North","South"})) totals North and South.

Why does SUMIFS return #VALUE!?

The sum range and the criteria ranges are not the same size, for example C2:C7 with A2:A8. Unlike SUMIF, SUMIFS does not resize them; every range must have the same number of rows and columns.

How do I make a SUMIFS criterion optional?

Replace an empty filter cell with the wildcard "*", which matches any text: =SUMIFS(C2:C7,A2:A7,IF(G2="","*",G2)). When G2 is empty every region is included.

Coddy programming languages illustration

Learn to code with Coddy

GET STARTED