When you have a list of data in a spreadsheet, it’s often helpful to count the number of cells containing values. In other words, you need to know how many cells actually contain data. To do this, you can use the COUNTA function. Let’s learn how to use the COUNTA function in Microsoft Excel.
How to Use COUNTA Function in Excel
Imagine that you have a list of names, and need to record whether each person has responded to a survey. Each participant who responds has “Yes” in the cell beside their names. Those who haven’t responded have a blank cell. You want to quickly count how many people have responded.
Of course, you could perform the count manually. But for a long list of names, that could be a tedious and time-consuming process. Fortunately, Excel offers a quick and easy way to perform the count with a formula.
To get started using the COUNTA formula, click into any empty cell in your workbook. Begin by typing an = sign. This tells Excel that you’ll be inputting a formula into the cell that you’ve selected.
To continue, type in COUNTA, then (. This launches the COUNTA formula. So far, you’ve typed:
=COUNTA(
Now, it’s time to select the range of cells that you want the function to analyze. In this example, the data range is contained in B2:B6. The easiest way to add this to your formula is to click and drag your cursor to select that range of cells.
Finally, type ). Your full formula reads:
=COUNTA(B2:B6)
Hit Enter on your keyboard, and Excel returns your solution in the cell: 3. This tells you how many cells in the chosen range contain data and values.
As you can see, COUNTA is a quick and easy way to analyze datasets in Microsoft Excel.