Count with COUNT, COUNTA and COUNTBLANK
Counting and finding functions9 min
Builds on AVERAGE, MIN and MAX.
A training coordinator in Chicago keeps the sign-up sheet for a first-aid course. Before each session she needs to know how many people have paid, how many fee cells are filled in and how many are still empty, and each of those is a different count of the same column.
How it works
Excel has a counting function for each of these questions, and all three take a range:
COUNTcounts the cells that hold numbers. Dates count too, because Excel stores a date as a number. Text doesn't, even text that looks like a number, such as an amount pasted in from another system.COUNTAcounts every cell that isn't empty: numbers, text, TRUE and FALSE, error values and formulas, including a formula that shows nothing.COUNTBLANKcounts the empty cells. A formula that returns empty text,"", counts as empty here too. A 0 doesn't, because it's a number.
Example
The fees are in B2:B8: four amounts, the word "waived" in B3, and two empty cells.
=COUNT(B2:B8)It returns 4. =COUNTA( returns 5, because "waived" isn't empty, and =COUNTBLANK( returns 2.
Common mistakes
=COUNT(on the names returns 0. Names are text, so count them with COUNTA.A2:A8) =COUNTA(as the number who have paid counts "waived" too. When only numbers answer the question, use COUNT.B2:B8) =COUNTA(counts the heading in A1 as one more person. Start the range on the first row of data.A1:A8) - A formula that shows nothing still counts for COUNTA. To count the formulas that show a number, use COUNT.
In short
- COUNT counts numbers, dates included.
- COUNTA counts every cell that isn't empty, formulas included.
- COUNTBLANK counts the empty cells and the formulas that show nothing.
- Pick the count that matches the question, and keep headings out of the range.
Practice
5 exercises · free, no account needed