You are on page 1of 8

Count and Sum Functions

Count | Countif | Countifs | Sum | Sumif | Sumifs


The most used functions in Excel are the functions that count and sum. You can count and sum based on one criteria or
multiple criteria.
Count
To count the number of cells that contain numbers, use the COUNT function.

Countif
To count cells based on one criteria (for example, higher than 9), use the following COUNTIF function.

Countifs
To count cells based on multiple criteria (for example, green and higher than 9), use the following COUNTIFS function.
Sum
To sum a range of cells, use the SUM function.

Sumif
To sum cells based on one criteria (for example, higher than 9), use the following SUMIF function (two arguments).

To sum cells based on one criteria (for example, green), use the following SUMIF function (three arguments, last argument
is the range to sum).
Sumifs
To sum cells based on multiple criteria (for example, blue and green), use the following SUMIFS function (first argument is
the range to sum).

General note: in a similar way, you can use the AVERAGEIF and AVERAGEIFS function to average cells based on one or
multiple criteria.

How to use SUMIF in Excel:


Now lets try and understand how to apply a SUMIF formula.

Suppose we have a sales table as shown below:


Objective: Our objective is to find the Total Sales Amount earned from North region.

Lets try to apply a SUMIF to find the solution.

range: In the range argument select the cells that include your criteria.
criteria: In the criteria argument enter your criteria i.e. North Region. Please note that
writing =North is same as writing North.

sum_range: In the sum_range argument select the cells that should be added after
evaluating the criteria.
After applying this formula the result comes out as: 490688 which is the addition of D3, D7
and D10.

Few Examples of SUMIF:


Lets have a look at some of the examples where SUMIF Function can be used:

Example 1: Suppose we have a table as below and now our goal is to find the total units sold
in East Region.

To find the solution we can apply a formula as: =SUMIF(B3:B11,"East",C3:C11)

This formula results into: 129

Example 2: In the same table as above, write a formula to find the total amount earned
before the date 01/01/2012.
In this case we can apply the formula as: =SUMIF(A3:A11,"<01/01/2012",D3:D11)

Example 3: In this example we have a table of performance of some schools at local events.
Here our task is to find the total number of awards won by School C in all the events.

Here we can use a formula: =SUMIF(C3:C11,"School C",D3:D11)

This formula results into 24 which is D5 + D7 + D9.

SUMIFS Function in Excel:


In the above examples we have seen how to use SUMIF function, now lets move to SUMIFS
function. As I have foretold that SUMIFS is an extension of SUMIF function, it has the
ability to add the items from a range that satisfy multiple conditions.
According to Microsoft Excel SUMIFS can be defined as a function that Add the cells
specified by a given set of conditions or criteria.

The syntax of SUMIFS function is as follows:

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2,


criteria2], )

Here, sum_range specifies the cells that are to be added based on the given conditions. It is
a required field.

criteria_range1 specifies the first range where the first criteria is to be evaluated.

criteria1 specifies the condition that is to be evaluated in the criteria_range1.

criteria_range2, criteria2 specifies the other ranges and their respective conditions.
It is an optional argument. SUMIFS supports a total of 127 range criteria pairs.

How to use SUMIFS in Excel:


To understand how to use SUMIFS function lets take an example:

Lets consider we have a Sales Table as shown below.

You might also like