Related Functions:

The COUNTA function returns a count of non-blanks within a supplied set of cells or values.

Note: The function is commonly used to return the number of non-blank cells in a range. However, as well as ranges of cells, the COUNTA function can directly received arrays of values, which are not stored in cells.

Syntax

=COUNTA(value1,[value2],…)

Note: Beginning with Excel 2007, you can enter up to 255 number arguments to the function. Excel 2003 would only accept up to 30 number arguments.

Arguments

Argument Description
value1,
[value2],…
The arguments, value1, [value2], etc, can be any values or references to cell ranges

Examples

  A B C D E
1     Formula Result Notes
2 1   =COUNTA(A2:A7) 4 The function used to count non-blank cells in one cell range
3 2 TRUE =COUNTA(A1:A7,B1:B4) 5 The function used to count non-blank cells in more than one supplied cell range
4 #NA        
5     =COUNTA(“text”,1,2) 3 Values supplied directly to the function

Usage note: If a cell contains an empty text string or a formula that returns an empty text string, this cell is counted as a non-blank by the COUNTA function.

The Excel COUNT and COUNTA functions are often confused, a brief description of each of these functions is given below:

  • COUNT returns the count of numeric values within a set of cells or values; includes numbers and dates
  • COUNTA returns the count of non-blank values within a set of cells or values; includes numbers, dates, text values, logical values and errors