Excel COUNTA Function with Examples

How to Use the COUNTA Function in Excel

In this tutorial, you'll learn how to use the Excel COUNTA function

COUNTA is a function to count the number of cells that are not blank in a range of cells.

COUNTA Syntax

The syntax of the COUNTA() function is as follows:

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

Arguments

  • value1: The first argument that you want to count
  • value2: [Optional]. The second argument that you want to count.
  • value3: [Optional]. The third argument that you want to count.

Remarks

  • value1value2,... can be a range of cells, a cell, or a value.
  • You can specify up to 255 arguments.
  • COUNTA counts cells that are not blank.

Excel COUNTA Examples

Demo data:

 ABCDEFG
1DateCodeNameQtyPrice ($)Amount ($)Seller
210/3/2019Item111HP Desktop PC3225675 
310/3/2019Item112Dell Desktop PC27501500James
410/4/2019Item113HP Laptop PC2235470John
510/4/2019Item114Dell Laptop PC37852355 

Example 1

The following example counts the number of cells, which are not blank in cells D2 through G5:

=COUNTA(D2:G5)

The above formula returns 14.

Example 2

You can use COUNTA(), as the following example shows:

=COUNTA(D2:G5,200,C3,C5)

There are four arguments in the above formula. 

The second argument is the number. 

COUNTA counts the number of cells in D2 through G5, C3, C5, and 200. The formula returns 17.

In this tutorial, you've learned how to use the Excel COUNTA function.

COUNTA is a function to count the number of non-blank cells in a range of cells.

If you want to count the number of blank cells, use the COUNTBLANK function.

If you want to count only cells that contain numbers, use the COUNT function.

If you want to count the number of cells with specified conditions, use COUNTIF or COUNTIFS.


See also:
Excel ROUNDUP Function with Examples
Excel MIN Function with Examples
Excel COUNTBLANK Function with Examples
Excel SUMIFS Function with Examples
Excel COUNTIFS Function with Examples