Skip to content
Klargrid

The COUNTA function

Counts the cells that contain something: a number, text, an error, or a formula returning an empty text.

Syntax

=COUNTA(value1, [value2], …)

In a French Excel: =NBVAL(valeur1; [valeur2]; …).

Arguments

  • value1, value2…: cells or ranges.

An example

=COUNTA(A2:A500)

The number of filled rows in column A.

Pitfalls

  • A formula returning "" counts as non-empty.
  • A space makes a cell non-empty, and invisible.

Going further

Frequently asked questions

How do I count distinct values?
=COUNTA(UNIQUE(A2:A500)) in Excel 365; see UNIQUE.