tech on the net

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

Type of Function

Worksheet Function Example

Let's take a look at an example to see how you would use the COUNTA function in a worksheet:

Microsoft Excel

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