Excel COUNTA Function – Count Non-Blank Cells in Excel

How to Use the COUNTA Function to Count Non-Blank Cells in Excel

In this tutorial, you'll learn how to use the Excel COUNTA function to count non-blank cells.

You want to count the number of cells that are not blank, including both numbers and strings. In such a case, you can use the 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.

Summary

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. There are times when you want to count the number of cells that are not blank. In such a case, you can use the COUNTA function.

Use the COUNTBLANK function to count the number of blank cells.
Use the COUNTIF function to count the number of cells that match a condition.
Use the COUNTIFS function to count the number of cells that match multiple conditions.


See also:
Excel ROUNDUP Function with Examples
Excel MIN Function with Examples
Excel COUNTBLANK Function – Count Blank Cells in Excel
Excel SUMIFS Function – Multiple Criteria
Excel COUNTIFS Function with Examples