MS Excel: COUNTA Function (WS)
In Microsoft Excel, the COUNTA function counts the number of cells that are not empty as well as the number of arguments that contain values.
Syntax
The syntax for the COUNTA function is:
COUNTA( argument1, [argument2, ... argument_n] )
argument1, argument2, ... argument_n are either ranges of cells or values. There can be up to 30 arguments.
Applies To
- Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Function
- Worksheet function (WS)
Worksheet Function Example
Let's take a look at an example to see how you would use the COUNTA function in a worksheet:

Based on the Excel spreadsheet above, the COUNTA function will return the following:
| =COUNTA(A1:A6) | would return 5 |
| =COUNTA(A1:A6, 129) | would return 6 |
| =COUNTA(A1:A6, 129, "techonthenet") | would return 7 |
| =COUNTA(A1:A6, 129, "techonthenet", -2) | would return 8 |