Skip to content

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:

  • COUNT counts 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.
  • COUNTA counts every cell that isn't empty: numbers, text, TRUE and FALSE, error values and formulas, including a formula that shows nothing.
  • COUNTBLANK counts 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)
Counts the cells in B2:B8 that hold a number.

It returns 4. =COUNTA(B2:B8) returns 5, because "waived" isn't empty, and =COUNTBLANK(B2:B8) returns 2.

The three functions ask different questions of the same cells. COUNT counts the amounts, COUNTA every cell with something in it, and COUNTBLANK the empty ones. Formula in B: B10 =COUNT(B2:B8), B11 =COUNTA(B2:B8), B12 =COUNTBLANK(B2:B8).

Common mistakes

  • =COUNT(A2:A8) on the names returns 0. Names are text, so count them with COUNTA.
  • =COUNTA(B2:B8) as the number who have paid counts "waived" too. When only numbers answer the question, use COUNT.
  • =COUNTA(A1:A8) counts the heading in A1 as one more person. Start the range on the first row of data.
  • 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

Start practicing
  1. Not started

    1. Invoices with an amount

    Formula · easy

  2. Not started

    2. Seats taken in a workshop

    Formula · medium

  3. Not started

    3. Overtime figures still missing

    Formula · medium

  4. Not started

    4. Orders that have shipped

    Formula · medium

  5. Not started

    5. A cell that only looks empty

    Quiz · easy