Count Function Tutorial
Count Function Tutorial
Note however that this function only works on cell ranges which contain numerical values.
{Special note: cells can contain values of the types:- text (sometimes called labels), numbers or formulae}.
To make a count on a range which contain text values, e.g. names or addresses, the count function will
return a total of 0 (zero).
To solve this problem, a =COUNTA function is used. This tells the program that the values to be counted
are of the text type.
The format for a counta function is exactly the same as for a count: =counta(B3:B25).
Practice Session
COUNTIF
While count & counta allows you to count all entities listed, you can also count only specified items in a
list. To do this, a =countif function is used. Like the count function, the countif function requires a specific
range, but it also requires a criterion (singular to criteria). In other words, you tell the program what items
you need to count.
The range is the set of cells which contains the values you are interested in (e.g. B3:B58).
The criterion is a value such as green, male, >500, etc.
1. You want to count the boys and the girls in the class. So you type:
=countif(D2:D26,”Male”)
a. Things to note – no spaces in the formula
b. The quotes around the criterion
c. The opening and closing parentheses
d. The above will count male students only
WILDCARDS
At this stage we will introduce a feature which is used in searches and can be used to find files using
Windows Explorer (on the harddrive or your flash drive).
A wildcard (*) represents all missing letters from a search criterion. For example, if you forgot the
name of your file which should have been MyEmployees.docx, you can search for My* or M*.docx.
the search will produce all files which start with My in the first case, and all MS Word files which start
with M is the second case.
You can now apply these to your spreadsheet. Simple format looks like =countif(M5:M38,”F*)
Practice