Confident CellsExcel practice Start free

Counting blanks and entries: practice exercises

COUNT, COUNTA, COUNTBLANK, COUNTIF "*". 4 exercises on real-looking data, each marked the moment you press Check. The first exercise is below to try now; the full lesson is part of Pro.

Your turn

Staff were asked whether they're coming to the away day. In H1, count how many haven't replied yet (their box in column B is empty).

ABCDEFGH
1EmployeeComing to the away day?Rating out of 10Not replied
2IvanMaybe3
3HamzaYes7
4Ella
5NadiaYes9
6Hannah
7OllieMaybe1
8Sunil
9Maria
10OwenYes5
11Lucy
12TomMaybenot sure
13ChenNon/a
14JessYes3
15BenMaybe5
16PippaNo9
17Zoe
18NiaNo2
19DevYes
20PriyaMayben/a
21Sam

How it works

COUNT counts the cells with numbers in. COUNTA counts every cell that isn't empty: numbers, text, anything. COUNTBLANK counts the empty ones.

To count only the text entries, take COUNT away from COUNTA, or use COUNTIF(range,"*"): the * wildcard matches any text.

=COUNT(C2:C6) =COUNTA(B2:B6) =COUNTBLANK(B2:B6) =COUNTIF(C2:C6,"*")

Three ways to count

  • COUNT(range): cells holding a number (dates count as numbers).
  • COUNTA(range): cells that aren't empty, whatever is in them.
  • COUNTBLANK(range): cells that are empty.

In a range of typed values, COUNTA plus COUNTBLANK adds up to the number of cells in the range. A formula that gives an empty result, "", is counted by both.

Worked example

ABC
1NameReplyRating
2AmiraYes8
3Ben
4CaraNon/a
5DevYes6
6Ewa
  1. =COUNT(C2:C6) in E2. Only Amira and Dev gave a number, so COUNT gives 2. Cara's n/a is text.
  2. =COUNTA(C2:C6) in E3. COUNTA counts the n/a as well: 3.
  3. =COUNTBLANK(C2:C6) in E4. Ben and Ewa left it empty: 2.

Counting just the text

Take the numbers away from all the entries: COUNTA(C2:C6)-COUNT(C2:C6).

Or let a wildcard do it: COUNTIF(C2:C6,"*") counts cells holding any text at all.

What you'll practise

  1. Staff were asked whether they're coming to the away day. In H1, count how many haven't replied yet (their box in column B is empty).
  2. Some people gave a rating and some wrote a comment instead, such as n/a. In H1, count how many people put anything in column C.
  3. In H1, count how many people wrote text in column C instead of giving a number.
  4. In H1, work out the response rate: the number who have replied in column B, divided by the number of people on the list. H1 is formatted as a percentage.

Guides with worked examples: Count cells with text, numbers or blanks in Excel · MO-210 Excel Associate (Microsoft 365): practice and checklist · MO-200 Excel Associate (Excel 2019): practice and checklist · COUNTIF and COUNTIFS: counting rows that match · Count unique values in Excel