In this tutorial, we will learn how to use COUNTA function, this function is used to count the number of cells, it only count cells with data and does not count any empty cell. Microsoft Excel 2021 is used.
COUNTA function can count every cell with any type of data, whether its numbers, strings, error or even a cell with a formula that does not return anything.
COUNTA function can primarily be used to count any type of cell, if the purpose is to count cells with numbers, you can use COUNT function, click here for the tutorial.
Syntax
It has the following syntax:
=COUNTA( value1, value2, ....)
You can enter a cell position or a cell range in the values. For Example:
=COUNTA(B12, C14, D18)
is an example of individual cell positions.=COUNTA(B12:B22
) is an example of a single cell range. However, you may enter multiple cell ranges.
Example: Using COUNTA function
In this example, we will be using an example of Project status and counting the number of cells using the command.
This example has numeric, string data and blank cells.
Enter the formula on any cell, select the cell and enter =COUNTA(
We enter “=” before starting any formula, and then type the name of formula, in this case, “COUNTA”.
Next, enter the range of cells, for which you want to count the number of cells. You can either select the range, or enter the range manually. The formula becomes: =COUNTA(B2:B9)
Press Enter to apply the formula.
From the above image, it can be seen that every cell has been counted except the blank cells.
More on counting cells: