WallStreetMojo

WallStreetMojo

WallStreetMojo

MENUMENU
  • Blog
  • Free Video Tutorials
  • Courses
  • All in One Bundle
  • Login
Home » Excel, VBA & Power BI » Excel Tutorials » Rows Function in Excel

Rows Function in Excel

By Jeevan A YJeevan A Y | Reviewed By Dheeraj VaidyaDheeraj Vaidya, CFA, FRM

Excel Rows Function

In simple words “ROWS” function in excel returns the count of the number of rows selected in the range. It is different from the row function, where row function gave us the row number for the selected cell instead rows function takes an array of rows as an argument and gives us the number of rows in that array, this is also a referencing function to identify the number of rows in a given array.

Rows Function Excel-Syntax

The array is nothing but cell reference. A cell reference could be a single cell or range of cells.

Rows Function in Excel

How to Use Rows Function in Excel? (with Examples)

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

Example #1 – Using Row Cell Reference

Let’s look at the simple example of the ROWS function.

In cell B3, I will open the ROWS function. In an array argument, I will give the cell reference as A1.

Rows Function in Excel Example1

I will close the bracket and hit enter, see what we get.

Example1.1

Since only one cell has been selected, it has returned the result as 1.

Now I will change the cell reference from A1 to A1: A3.

Rows Function in Excel Example1.2

Now close the formula and see what the result is.

Example1.3

This time we got the result as 3.

The reason why we got the result as 3 because we closely look at the cell reference. It says A1: A3, i.e., a total of three rows are selected in the range of cells.

Example #2 – Using Column Cells Reference

ROWS function, counts only how many rows are selected in the reference. Now I will apply the formula in cell B3 as below.

Popular Course in this category
Sale
All in One Excel VBA Bundle (35 Courses with Projects)
4.9 (1,353 ratings)
35+ Courses | 120+ Hours | Full Lifetime Access | Certificate of Completion
View Course

Rows Function in Excel Example2.0

I have given the cell reference as A1: C1. Let’s see what the result is.

Rows Function in Excel Example2.1

Even though I have selected 3 cells, we still got the result as 1 only!!!

This is because we have selected 3 cells in the same row, i.e., different column cells. Since we have selected the range of cells in the same row, we got the result as 1 only.

So, ROWS Formula cannot count COLUMNS in excel here.

Example #3 – Count of Rows

ROWS function, counts, only how many rows are there in the reference, now look at this example.

Example3

I have given the cell reference as A4, i.e., 4th row of the worksheet hit enter, and see what the result is.

Rows Function in Excel Example3.1

Oh!!! The result is 1 even though we have selected the 4th row of the worksheet.

As we told in the beginning, the ROWS function doesn’t return row numbers. Rather it returns only the count of selected rows. In this case, since we have selected only one row, the result is 1, not 4.

Example #4 – Insert Serial Numbers

We can use the ROWS function to insert serial numbers from 1. For example, we usually insert serial numbers from cell A2, so we will show you how to insert serial numbers with the ROWS formula in excel.

Open ROWS function in cell A2.

Example4

Select the cell reference as A2: A2.

Rows Function in Excel Example4.1

For the first cell, the reference makes the reference as absolute. $A$2: A2.

Example4.2

Now hit the enter key. By hitting the enter key, we should get the result as 1.

Rows Function in Excel Example4.3

Now simply drag the formula down to get the serial numbers.

Since we have made the first part of the cell reference as absolute, it remains the same when we drag down, but another cell part of the cell reference keeps changing from A2 to A3, A3 to A4, and so on.

Example4.4

Difference between ROW & ROWS

After knowing the ROWS function, it is important to know how it differs from the ROW function in excel. Both are so confusing, so we will sort out this now.

The ROW function returns the selected cell’s row number in the worksheet. For example, if we select the cell reference as A3 by using the ROW function.

Rows Function in Excel Example5

Since A3 is the 3rd row in the worksheet, we got the result as 3.

Example5.1

But on the other hand, if we enter the same cell reference by using the ROWS function.

Rows Function in Excel Example5.2

We will get the result as 1.

 Example5.3

Because Excel ROWS function returns the count of how many rows are selected in the range.

So, the ROW Function returns the row number of the selected cell, and the ROWS function returns the count of selected rows in excel.

Recommended Articles

This has been a guide to Rows Function in Excel. Here we discuss how to use rows formula to returns the count of a number of rows selected in a range in excel with examples and downloadable excel template. You can learn more about excel functions from the following articles –

  • VBA Last Row
  • Row Header
  • Convert Rows to Columns in Excel
  • Convert Columns to Rows in Excel
8 Shares
Share
Tweet
Share
All in One Excel VBA Bundle (35 Courses with Projects)
  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>
Primary Sidebar
Footer
COMPANY
About
Reviews
Contact
Privacy
Terms of Service
RESOURCES
Blog
Free Courses
Free Tutorials
Investment Banking Tutorials
Financial Modeling Tutorials
Excel Tutorials
Accounting Tutorials
Financial Statement Analysis
COURSES
All Courses
Financial Analyst All in One Course
Investment Banking Course
Financial Modeling Course
Private Equity Course
Venture Capital Course
Excel All in One Course

Copyright © 2021. CFA Institute Does Not Endorse, Promote, Or Warrant The Accuracy Or Quality Of WallStreetMojo. CFA® And Chartered Financial Analyst® Are Registered Trademarks Owned By CFA Institute.
Return to top

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Book Your One Instructor : One Learner Free Class
Let’s Get Started
Please select the batch
Saturday - Sunday 9 am IST to 5 pm IST
Saturday - Sunday 9 am IST to 5 pm IST

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Login

Forgot Password?

WallStreetMojo

Download Rows Function Excel Template

Special Offer - All in One Excel VBA Bundle (35 Courses with Projects) View More