Lessons › Excel & Google Sheets
Excel & Google Sheets lesson
COUNT and COUNTA
Four of the six customers gave an email. COUNT does the same for numbers only.
Try this lesson free →Example
Some cells are empty. COUNTA counts only the cells with something in them:
=COUNTA(B2:B7)| Customer | Visits | Spend | Report | Answer | ||
|---|---|---|---|---|---|---|
| Ada | ada@mail.com | 3 | 120 | Customers | ||
| Ben | 1 | Emails given | ||||
| Cara | cara@mail.com | 45 | Visits recorded | |||
| Dan | dan@mail.com | 5 | 210 | Spend recorded | ||
| Efe | 2 | 30 | Missing emails | |||
| Femi | femi@mail.com |
Key points
COUNTHow many numbers are in a range. Text and empty cells are skipped.
COUNTAHow many cells aren't empty, whether they hold text or numbers.
COUNTA(A2:A7)-COUNTA(B2:B7)Everyone, minus those who filled it in: how many are missing.
Put together: =COUNTA(B2:B7) counts the emails, =COUNT(C2:C7) counts the visit numbers.
Practice
1. In G2, count the customers.
=COUNTA(A2:A7)2. In G4, count how many visit numbers were recorded.
=COUNT(C2:C7)3. In G3, count how many customers gave an email.
=COUNTA(B2:B7)4. In G5, count how many spend amounts were recorded.
=COUNT(D2:D7)5. In G6, work out how many emails are missing: all the customers minus those who gave one.
=COUNTA(A2:A7)-COUNTA(B2:B7)Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.
Try this lesson free →