Counting the Number of Cells Containing Text in a Range

In this article, we will learn how to count the number of cells that contain text in a range in Microsoft Excel. To solve this problem, we will use COUNTA and COUNT function.

COUNTA function will help to count the non-empty cells within a range.


image 1


COUNT function will help to count the numbers containing cells within a range.

image 2


Let’s take an example to understand:-

We have a range which is containing both numbers and text.

image 3


Now we want to count text containing cells within the range; follow below steps:-

  • Enter the formula in cell B2
  • =COUNTA(A2:A17)-COUNT(A2:A17)

image 4


  • Press Enter
  • The function will return 6, it means 6 cells are there which are containing the text

image 5


Note:-Here, we have used mathematical concept whereby we subtracted the two numbers and output is our required result.


image 48


If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.

We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.