BBampaa

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 →
About 5–10 minutes · no sign-up needed

Example

Some cells are empty. COUNTA counts only the cells with something in them:

=COUNTA(B2:B7)

Typed into cell G3 of this sheet:

CustomerEmailVisitsSpendReportAnswer
Adaada@mail.com3120Customers
Ben1Emails given
Caracara@mail.com45Visits recorded
Dandan@mail.com5210Spend recorded
Efe230Missing emails
Femifemi@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

Try each one in your head first, then open the answer.

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 →
About 5–10 minutes · no sign-up needed