Count and Sum Functions
Count and Sum Functions
Cotton 50
Silk 60
Nylon 70
Ryon 80
Total 210
Adding the Data
Formula
=SUM(Start Row Name: End Row Name)
=SUM(C4:C7)
Formula
ALT then = then ENTER
Formula
When adding selected rows
Suppose we need to add length of cotton, nylon and silk only
=SUM(C19, C21:C22)
the sum criteria is ">=50" which means greater than or equal to 50. There are other operators you can
use like "<=50" which is less than or equal to 50. And there's "<>50" which is not equals 50.
Note
SUM with individual Cell References vs. Ranges
Using a formula like: SUM (A1,A2,A3,B1,B2.B3)
Is equally error prone when inserting or deleting rows within the referenced range for the same
reasons. It’s much better to use individual ranges, like: SUM(A1:A3,B1:B3)
Which will update when adding or deleting rows.
Using 3D Method
Suppose you have single sheet for each month (January -December) and you need to total them on a
summary sheet
=SUM (January:December!A2)
This will sum cell A2 in each sheet from January through December
NB: If your worksheets have spaces in their names like "January sales," then you need to use an
apostrophy when referencing the sheet names in the formula.
=SUM('January Sale:December Sales'! A2)
The 3D method will also work with other functions line AVERAGE, MINIMUM, MAXIMUM, etc.
=AVERAGE(Sheet1:Sheet3!A1)
=Min(Sheet1:Sheet3!A1)
=Max(Sheet1:Sheet3!A1)
Using COUNT Function
The COUNT function will count cells that contains numbers
A B C Formula
50 40 =COUNT(A4:A9)
This will give the number of cells containing n
36 69
24 104
23.9 90 34
102 23
67 47 22
4
Formula
A B C =COUNT(A13:A19)
This will give the number of cells containing n
Income Savings Expenditure It will not count text in the cells
50 40
36 69
24 104
23.9 90 34
102 23
67 47 22
4
Formula
A B C =COUNTA(A13:A19)This will give the number
mentioned column (here A) which are no
Income Savings Expenditure This function does not distinguish between a te
50 40
36 69
24 104
23.9 90 34
102 23
67 47 22
5 6
A B C Formula
Income Savings Expenditure =COUNTBLANK(A33:A39)
This will count all the blank cells
50 40 This does not distinguish between a text and
36 69
24 104
23.9 90 34
102 23
67 47 22
2
Formula
Country
Number of representatives COUNTIF(A43:A49,"Indi
This gives the number of time India h
India 39 the data
Sriranka 40
Pakistan 36
India 14
Nepal 90
Russia 102
India 47
3
Formula
Item Number COUNTIF(A53:A59,"*Sare
This will count the number of times
Saree 39 Saree appears. Here in thi sdata ther
Kurti 40 types of sarees. Thus use "*
Silk Saree 36 Another formula can be used in case
write the cell which contains the crit
Cotton the name of criteria
14
Saree =COUNTIF(A53:A59,"*" & A5
Designer
90
Saree
Dress 102
Lehanga 47
4
4
COUNTIF only supports a single condition. If you need to apply multiple criteria, use the COUNTIFS function.
If you need to manipulate values in the range argument as part of a logical test, see the SUMPRODUCT and/or FIL
Formula
=COUNT(A4:A9)
number of cells containing numbers in A
Formula
=COUNT(A13:A19)
number of cells containing numbers in A
ll not count text in the cells
Formula
9)This will give the number of cells in the
olumn (here A) which are not empty
not distinguish between a text and number
Formula
COUNTBLANK(A33:A39)
will count all the blank cells
stinguish between a text and a number
Formula
COUNTIF(A43:A49,"India")
s the number of time India has appeared in
the data
Formula
COUNTIF(A53:A59,"*Saree")
count the number of times the string data
ppears. Here in thi sdata there are multiple
types of sarees. Thus use "*Saree"
formula can be used in case you intend to
e cell which contains the criteria instead of
the name of criteria
COUNTIF(A53:A59,"*" & A53 & "*")