If you ever need to count the number of cells that contain text in Excel, there is a very easy way to do it. You will need two basic functions:
- COUNT – this Excel function returns the number of cells in a range that contain numbers
- COUNTA – this function returns the number of cells that are not empty
Intuitively, we know that the number of cells that contain text (not numbers!) is equal to the number of non blank cells – the number of cells containing numbers. In other words: COUNTA – COUNT.
Let’s look at a simple example to illustrate. Suppose we have the following data in our spreadsheet:
Place the cursor in the cell that you want to hold the results and type
Alternatively, if you type out
you can then drag your cursor over the cell range to select it and Excel will insert D1:D12 into the formula. You can do the same with the COUNT argument, too. When you press Enter, Excel resolves the equation and displays 5.