## 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.

### #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.

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.

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.

Firstly, select all the rows in the excel.

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 bar.

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.

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

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 11^{th} row contains a space in it.

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.

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

### #3 – Count the rows that only have the numbers

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

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.

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

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

### #4 – Count Rows, which only has the Blanks

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

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

### #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 (*).

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 which is limited to while still selecting the rows. But how do we count then?

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

**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 –

- Excel VBA COUNTIF Function
- Add Multiple Rows in Excel
- Excel Count Formula
- How to Insert Multiple Rows in Excel?

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