COUNT and COUNTA
About this lesson
COUNT tells you how many cells in a range hold a number. COUNTA tells you how many cells hold anything.
- count the numbers in a range with COUNT and the filled cells with COUNTA.
- find how many rows are missing a figure by subtracting one from the other.
- count the empty cells in a range with COUNTBLANK.
The idea
These two functions become useful on a half-finished sheet, and most sheets are half-finished. A cell that says "not found" is invisible to COUNT. COUNTA sees it. A truly empty cell is invisible to both. This gives you a useful check. COUNTA minus COUNT is the number of cells with words instead of numbers. On a stock count, that is the number of rows with an excuse instead of a figure.
If the two functions give very different answers, it is not a rounding problem. It is a data problem, and now you know how big it is.
The mistake to watch for
Using COUNT on a column of names. COUNT counts numbers only, so a list of initials counts as nothing and looks like an empty column. COUNTA counts anything filled in; COUNTBLANK counts what is empty. Choose by what the column holds, not by the number you hope to see.
Where this comes up again
This lesson needs JavaScript to run. Everything below is the lesson in full, but you cannot type into the grid or be marked.
COUNT tells you how many cells in a range hold a number.
In E2, type =COUNT(B2:B6).
It counts how many of the 5 items have a real number in the Counted column.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Item | Counted | Checked by | ||||
| 2 | Blue paint 5L | 14 | RS | Numbers counted | |||
| 3 | White paint 5L | 0 | RS | ||||
| 4 | Masking tape | Cells filled in | |||||
| 5 | Filler 2kg | 6 | MK | ||||
| 6 | Brush set | not found | MK | Items signed off | |||
| 7 | |||||||
| 8 | Still to count | ||||||
| 9 | |||||||
| 10 | Never started |
Every step
-
COUNTtells you how many cells in a range hold a number. InE2, type=COUNT(B2:B6). It counts how many of the 5 items have a real number in the Counted column. -
The Checked by column holds initials, never numbers. Read
=COUNT(C2:C6)and say what it returns. -
COUNTAcounts every cell that has anything in it: numbers, words, anything except empty. InE4, count the filled cells in the Counted column,B2:B6, withCOUNTA. -
In
E6, count how many items somebody signed off. The initials are inC2:C6. Use the function that can see text. -
In
E8, write a formula withCOUNTAandCOUNT. It should show how many items still need a real number. That is the number of item names in column A, minus the number of figures in column B. -
There is a third one.
COUNTBLANKcounts the cells that are completely empty. InE10, count how many cells inB2:B6have nothing in them at all.