SUMIFS practice exercises

Add up rows that meet several conditions at once, such as a region and a minimum amount. Note that the sum range comes first.

Start the first exercise

How SUMIFS works

SUMIFS adds up the numbers in the rows where every one of your conditions is met. You give it the sum range first, then a pair for each condition: a range to test and a criterion. It works the same in Excel and Google Sheets.

=SUMIFS(C2:C9,A2:A9,"North",B2:B9,"Shoes") totals the sales of shoes in the North region. For a period, use the date column twice: ">="&F1 and "<="&F2 give you the dates from F1 to F2, both days included. To leave one value out, use "<>Returned" as the criterion.

Mind the order: the sum range comes first in SUMIFS but last in SUMIF, so a formula copied from one to the other breaks quietly. All the conditions must be true at the same time. The exercises below cover two conditions, conditions taken from cells, sums between two dates, and leaving one value out.

  1. 1SUMIFS with two conditionsIn E2, use SUMIFS to total the Sales of Shoes in the North region.
  2. 2SUMIFS with the conditions in cellsPremiumIn G2, use SUMIFS to total the Sales for the region in E2 and the product in F2. Point at the cells instead of typing the words.
  3. 3SUMIFS between two datesPremiumIn F3, total the amounts of the orders dated from F1 to F2, both days included. Give SUMIFS the date column twice: ">="&F1 and "<="&F2.
  4. 4SUMIFS that leaves one value outPremiumIn F1, total the North orders that were not returned. Give SUMIFS two conditions: the region "North" and the status "<>Returned".

Functions in this topic

Read the guide

Questions

How do I use SUMIFS with OR logic?

SUMIFS only combines conditions with AND. For OR, add one SUMIFS per option, as in =SUMIFS(D2:D20,B2:B20,"North")+SUMIFS(D2:D20,B2:B20,"South"). That works when the options exclude each other, such as two regions. If one row can match both, the row would be counted twice.

Why does SUMIFS return #VALUE!?

The sum range and every criteria range must have the same number of rows and columns. If one is B2:B10 and another is A2:A9, SUMIFS gives #VALUE!. Check the ranges one by one. The same error appears if a range points to a closed workbook.

How do I sum cells that contain certain text with SUMIFS?

Put wildcards around the word, as in =SUMIFS(D2:D20,A2:A20,"*desk*",C2:C20,"North"). The * stands for any number of characters, and ? stands for exactly one. The match ignores upper and lower case. Put the wildcard text in quotes, or join it to a cell with &.