How to count cells that contain data
To count cells, within a given range or list of arguments, that contains data, you use the COUNTA function.
Data in this context includes error values, spaces and empty text (”").
Syntax
COUNTA(value1,value2,…)
Examples:
COUNTA(A1:A20) :counts any nonblank cells in a range of cells.
COUNTA(A1:A20, 7,”ABC”) :counts nonblank in a range of cells plus the second argument (7), and the third argument “ABC”.
In the example below, cell B7 contains the function: =COUNTA(B1:B9). The result is 6. Here the non blank cells are B1, B3, B4, B6, B7 (formula that returns an empty text) and B9 (contains spaces).
Applies to: Excel 2003



