How to Use the Excel ROWS Function
Do you need to know how many rows are in a given range? The ROWS Function can help! You can use this function to look up and provide the number of rows in each reference or array. Thus, the function, after receiving an Excel range, will return the number of rows that are contained within that range. In this guide, we will show you how to use the ROWS Function in Excel. We will also provide some tips and examples so that you can get the most out of this easy-to-use function!
What Does ROWS Do?
ROWS is an Excel Lookup/Reference Function. You can use ROWS to look up and provide the number of rows in each reference or array. Thus, the ROWS Function, after receiving an Excel range, will return the number of rows that are contained within that range.
This is definitely one of the more straightforward functions in Excel. You will not find many uses for this function, but we want to make sure and cover everything there is to know.
Where To Find It?
Option 1:
You can find the ROWS function in the Formulas tab of Excel under Lookup & Reference
Option 2:
You can use Formula Builder to walk you through the formula step by step.
Option 3:
You can manually type the formula into any cell.
The Formula
=ROWS(reference)
- reference – this can be a single cell reference, a range, or multiple cell references/ranges separated by commas
Let’s Take a Look at an Example
Excel Workbook
Example
These may be some of the most straightforward examples we have ever done on this blog.
First, we will use ROWS to count the row for one cell. The formula is simply the cell reference nested within ROWS or =ROWS(D4). This returns a count of 1, for 1 row.
Second, we will use ROWS to count the rows in one range. The formula is simply the range reference nested within ROWS or =ROWS(D4:E7). This returns a count of 4, for 4 rows.
Lastly, we will use ROWS to count four references. Really getting crazy with these examples. The formula is the two range references nested within ROWS or =ROWS({D4:E5,F6,G7}). Keep in mind if you are counting multiple areas, you need to add brackets or the formula will return an error. This returns a count of 4, for 4 rows.
Tips and Tricks
Did I get a #NULL error?
This means that you didn’t fill out the arguments in the correct format. You may have entered A 4 instead of A4 or B2C4 instead of B2:C4. Check your entry and try again.
Let’s Recap
The ROWS function doesn’t do much, but it’s straightforward and easy to use. I hope this quick walk-through helped expand your knowledge, not many people will know this function exists.
Have any questions? Are there other topics you would like us to cover? Leave a comment below and let us know! Make sure to subscribe to our Newsletter to receive exclusive financial news right to your inbox.