# To count how many cells contain data in Excel you use the COUNTA Function. Using the COUNTA Function will only count the cells that are not empty.

The syntax for the COUNTA Function is:

`=COUNTA(value1, value2, value3, ...)`

The values can be cell references, or values typed into the formula. The maximum number of values for COUNTA is 30.

So let’s assume you have numbers in cells A1 to A200, some of which are empty cells. Using cell B1 let’s enter the COUNTA Function. So you would write:

=COUNTA(A1:A200)

Once written push enter. You should be presented with a number that matches the number of cells that contain data.

It is important to note that Excel’s COUNTA Function will count cells that contain formulas, even if the cell looks empty. COUNTA also counts any cells that contained formulas that evaluated to “”, but were then converted to values using the Paste Special feature.

I hope you found this post on Excel’s COUNTA Function useful.