What is the use of COUNTA Function in Excel?

The COUNTA function counts cells containing any type of information, including error values and empty text (“”). For example, if the range contains a formula that returns an empty string, the COUNTA function counts that value. The COUNTA function does not count empty cells.

  • Purpose

Count the number of non-blank cells

  • Return value

A number representing non-blank cells.

  • Syntax

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

  • Arguments

value1 - An item, cell reference, or range.

value2 - [optional] An item, cell reference, or range.

Example:

In the example shown, COUNTA is set up to values in the range B5:B15:

=COUNTA(B5:B15) // returns 9

COUNTA returns 9, since there are 9 non-empty cells in the range B5:B15.

The COUNTA function counts numbers and text:

=COUNTA(1,2,3) // returns 3 
=COUNTA(1,"a","b") // returns 3 
=COUNTA(1,2,3,"a",5%) // returns 5