Excel Count Rows (Table of Contents)
- #1 – Count Rows which has only the Data
- #2 – Count all the Rows which has the Data
- #3 – Count Rows which has only the Numbers
- #4 – Count Rows which has only the Blanks
- #5 – Count Rows which has only the Text Values
- #6 – Count all the Rows in the Range
How to Count Number Rows in Excel?
We require to count the number of rows in the data. We have several formulas to count in excel. In this article, I will show you the ways of counting rows in excel using formula, rows with data, empty rows, rows with numerical values, rows with text values, and many other things which are related to counting 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 contains the data in it.
We can excel count rows which have data by just selecting the range of cells in excel. Take look at the below data.
I have totally 10 rows (border inserted area). In this 10 row, I want to count exactly how many cells has 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 that 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 11th 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 which has the Data
Now we know how to quickly check how many rows actually contains the data. But that is not the dynamic way of counting rows which has data. We need to apply COUNTA function to count how many rows contain the data.
Apply COUNTA function in D3 cell.
So the total number of rows contains the data are 8 rows. Even this formula treats space as data.
#3 – Excel Count Rows which has only the Numbers
We have seen how to count all the number rows in excel which have data in it. Take the same data for example. 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 the 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 – Excel Count Rows which has only the Blanks
Now take a look at the example of how to count rows which have only 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 – Excel Count Rows which has only the Text Values
We have learned how to find the total number of rows which has data, how to find the total number of rows which has only numerical values, how to count the total number of rows which has blanks. The how do we count the total number of rows which has only 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 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 text value row. Even if the row contains numerical and text value it will be treated as text value only.
#6 – Excel Count all 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 return how many rows are actually selected.
Things to Remember about Count Rows in Excel
- 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.
You can Download this Count Rows Excel template here – Count Rows Excel Template
This has been a guide to Count Rows in Excel. Here we discuss the top 6 the ways of counting rows in excel using formula, rows with data, empty rows, rows with numerical values, rows with text values, and many other things which 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 –