Suppose you need to know if your team members have entered all their project hours in a worksheet. In other words, you need to count the cells that have data. And to complicate matters, the data may not be numeric. Some of your team members may have entered placeholder values such as "TBD". For that, use the COUNTA function.
Here's an example:
The function counts only the cells that have data, but be aware that "data" can include spaces, which you can't see. And yes, you could probably count the blanks in this example yourself, but imagine doing that in a big workbook. So, to use the formula:
Determine the range of cells you want to count. The example above used cells B2 through D6.
Select the cell where you want to see the result, the actual count. Let's call that the result cell.
In either the result cell or the formula bar, type the formula and press Enter, like so:
You can also count the cells in more than one range. This example counts cells in B2 through D6, and in B9 through D13.
You can see Excel highlights the cells ranges, and when you press Enter, the result appears:
If you know you don't need to count text data, just numbers and dates, use the COUNT function.