Today’s topic is SUMIFS and COUNTIFS.
You might be thinking, “Wait a minute Doug, you already covered this topic!” But look again at those formula names, there is an “S” at the end of them indicating a completely different and more advanced function.
These two formulas are actually new to Excel as of 2007. These formulas have helped reduce the need for moving data into Microsoft Access or coming up with super complex array formulas. As their names might suggest these functions allow the user to sum or count data based on multiple criteria instead of just a single criteria.
Here are the inputs for the SUMIFS function:
Notice how “sum_range” is the first input in this for formula which is the opposite of the SUMIF function. Also notice the ellipsis at the end which indicates that more inputs can be received. This formula can actually handle up to 127 different range/criteria pairs.
Here are the inputs for COUNTIFS:
COUNTIFS is very similar to SUMIFS just without the “sum_range.” This formula can also hold up to 127 different range/criteria pairs.
Let’s look at an example. Download the example spreadsheet here.
The scenario for this example is that you have a list of all the sales for your five sales people and you would like to know what their sales in the Southwest region look like. Thus, you are trying to find the total amount of sales based on two criteria: 1) the salesperson 2) the region. With the regular SUMIF or COUNTIF function you can only specify one criterion, thus we will use SUMIFS and COUNTIFS.
- Once you have the spreadsheet open, navigate to cell I3 and copy this formula into the cell: =SUMIFS($D$3:$D$52,$B$3:$B$52,G3,$C$3:$C$52,H3).
- Copy the formula down to the other sales people
- Navigate to cell J3 and copy in this formula: =COUNTIFS($B$3:$B$52,G3,$C$3:$C$52,H3)
- Copy the formula down to the other sales people.
- Good job.
Since these formulas are a bit complex I’ve made some diagrams to help explain what is going on: