Math

COUNTA

Definition

COUNTA returns how many cells in the list are not empty.

Syntax

=COUNTA(value1, [value2], ...)

Arguments

Argument Meaning
value1 The first item to check: a cell, a range such as B2:B5, or a typed value.
value2, ... Optional extra items or ranges to check as well.

Worked example

A packing list stores notes in B2:B5. Some cells are empty.

A: Slot B: Note
1 4
2 bin
3
4 bin

Formula: =COUNTA(B2:B5)

Result: 3. B2, B3, and B5 hold values, including the number 4, and B4 is empty, so three cells count.

Practice

Cell A2 holds 1, cell A3 holds x, cell A4 is empty, and cell A5 holds 0. In B2, write a formula that counts how many cells in A2:A5 are not empty.

  1. In B2, write a COUNTA formula for A2:A5.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

COUNT tallies only numeric cells, so it would skip the letter x. COUNTIF counts cells that pass one test. COUNTA counts every filled cell.

Common mistake

Expecting COUNTA to skip 0: a cell that holds 0 is filled, so it still counts.

Related functions

These links are related functions.