Count Rows in Excel

How to Count Number of Rows in Excel?

Here are the different ways of counting rows in excel using the formula, rows with data, empty rows, rows with numerical values, rows with text values, and many other things that are related to counting number of rows in excel.

You can download this Count Rows Excel Template here – Count Rows Excel Template

#1 – Excel Count Rows which has only the Data

Firstly we will see how to count number rows in excel which has the data. In general, there could be empty rows in between the data but often we need to ignore them and find exactly how many rows which contain the data in it.

  1. We can count a number of rows that have data by just selecting the range of cells in excel. Take look at the below data.

    Row Count Example 1

    I have a total of 10 rows (border inserted area). In this 10 row, I want to count exactly how many cells have data. Since this a small list of rows, we can easily count the number of rows. But when it comes to the huge database it is not possible to count manually. This article will help you with this.

  2. Firstly, select all the rows in the excel.

    Row Count Example 1-1

  3. Actually, this is not telling me how many rows contain the data here. Now take look at the right-hand side bottom of the excel screen i.e. a status barStatus BarAs the name implies, the status bar displays the current status in the bottom right corner of Excel; it is a customizable bar that can be customized to meet the needs of the more.

    Row Count Example 1-2

    Take look at the red circled area, it says COUNT as 8 which means the out of 10 selected rows 8 has data in it.

  4. Now I will select one more row in the range and see what will be the count.

    Row Count Example 1-3

  5. I have selected 11 rows in total but count says 9 whereas I have data only in 8 rows. When we closely examine the cells the 11th row contains a space in it.

    Row Count Example 1-4
    Even though if there is no value in the cell and it has only space excel will be treated as the cell which contains the data.

#2 – Count all the rows that have the data

Now we know how to quickly check how many rows actually contain the data. But that is not the dynamic way of counting rows that have data. We need to apply COUNTA function to count how many rows contain the data.

Apply COUNTA function in the D3 cell.

Row Count Example 2

So the total number of rows contains the data are 8 rows. Even this formula treats space as data.

Row Count Example 2-1

#3 – Count the rows that only have the numbers

Here I want to count how many rows contain only numerical values.

Row Count Example 3

I can easily say 2 rows contain numerical values. Let’s examine this by using formula. We have a built-in formula called COUNT which counts only numerical values in the supplied range.

Row Count Example 3-1

Apply COUNT function in cell B1 and select the range as A1 to A10.

Row Count Example 3-2

COUNT function also says 2 as the result. So out of 10 rows, only rows contain numerical values.

Example 3-3

#4 – Count Rows, which only has the Blanks

We can find only blank rows by using the COUNTBLANK function in excel.

Example 4

Totally we have 2 blank rows in the selected range which are revealed by count blank function.

Row Count Example 4-1

#5 – Count rows that only have text values

Remember we don’t have any straight in COUNTTEXT function unlike previous cases, we need to think a little bit different here. We can use the COUNTIF function with wildcard character asterisk (*).

Example 5

Here all the magic is done by the wildcard character asterisk (*). It matches any of the alphabets in the row and returns the result as a text value row. Even if the row contains numerical and text value it will be treated as text value only.

#6 – Count all of the rows in the range

Now comes the important part. How do we count how many rows we have selected? One is using Name Box in excel which is limited to while still selecting the rows. But how do we count then?

Example 6

We have built-in the formula called ROWS which returns how many rows are actually selected.

Example 6-1

Things to Remember

  • Even space is treated as a value in the cell.
  • If the cell contains both numerical and text value it will be treated as a text value.
  • ROW will return what is the current row we are in but ROWS will return how many are there in the supplied range even though there is no data in the rows.

Recommended Articles

This has been a guide to Count Rows in Excel. Here we discuss the top 6 ways of counting rows in excel using the formula, rows with data, empty rows, rows with numerical values, rows with text values, and many other things that are related to counting rows in excel along with practical examples and downloadable excel template. You may learn more about excel from the following articles –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion