COUNT and COUNTA
Part of the Fundamentals section of Coddy's Excel journey — lesson 26 of 42.
Sometimes the question isn't "how much?" but "how many?". Excel has two counters, and the difference between them matters:
=COUNT(B2:B6) counts cells holding NUMBERS
=COUNTA(B2:B6) counts cells that are NOT EMPTYPicture a score column where some students have a number and others have the text absent: 85, absent, 92, absent, 78. Over that range, COUNT returns 3, only the numeric scores. COUNTA returns 5, every filled cell, text included.
So: COUNT answers "how many actual numbers do I have?" (useful before trusting an average), while COUNTA answers "how many entries are there at all?". Neither counts empty cells.
The extra A in COUNTA stands for all, a handy way to keep them straight. Same pattern as always: name, parentheses, range.
Challenge
EasyThe score column mixes numbers and the word absent: check B2:B6.
Two labels wait below the table: Graded in A8 and Entries in A9.
- In
B8: how many cells inB2:B6hold a number, useCOUNT - In
B9: how many cells inB2:B6are not empty, useCOUNTA
The tests swap some "absent" entries for real scores, so the two answers must come from formulas.
Try it yourself
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Student | Score | |||||
| 2 | Maya | 85 | |||||
| 3 | Leo | absent | |||||
| 4 | Zoe | 92 | |||||
| 5 | Sam | absent | |||||
| 6 | Ivy | 78 | |||||
| 7 | |||||||
| 8 | Graded | ||||||
| 9 | Entries | ||||||
| 10 | |||||||
| 11 | |||||||
| 12 | |||||||
| 13 | |||||||
| 14 |
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1Meet the Spreadsheet
What Is a Spreadsheet?Cells and ReferencesYour First CellsRows, Columns and the GridRecap: Meet the Grid