Start Free Course

ROW Function In Excel

Written by ExcelMojo Editorial Team ExcelMojo Editorial Team ExcelMojo editorial profile and article credentials. Full Bio
Reviewed by Dheeraj Vaidya, CFA, FRM Dheeraj Vaidya, CFA, FRM Reviewed for accuracy, clarity, and editorial standards. Full Bio
Updated Apr 27, 2026
Read Time 9 min

What Is ROW Function In Excel?

The ROW Function in Excel is used to find the row number of a cell reference or a cell range, and not its value. In a large dataset the function quickly finds the row index. The ROW Function in Excel is an inbuilt function, so we can enter it as a formula or insert it from the Function Library, Lookup & Reference group.

For example, the following table contains a requirements list for what row number should get displayed in each cell in the cell range B2:B4.

Frequently Asked Questions (FAQs)

1. Where is the ROW function in Excel?

The ROW function in Excel is in the Formulas tab. Click Formulas 🡪 Lookup & Reference 🡪 ROW to access it.

ROW Function in Excel FAQ1

2. Why is the ROW function not working in Excel?

The ROW function in Excel might not work due to the following reasons:
● The specified cell or cell range is invalid.
● Multiple references are provided as the argument to the ROW function.
● We provided an argument that is not a proper cell reference.

3. How to execute the ROW function in Excel VBA?

We can execute the ROW function in Excel VBA, using the below steps as shown in the following example.
The following table shows a list of products and their prices.

ROW Function in Excel FAQ3

The steps to find the row number of each product using the ROW function and the Excel VBA are:
1: In the worksheet with the above table, press the shortcut keys Alt + F11 to open the “VBA Editor”.

FAQ3 - Step1

2: Click on the required VBAProject in the menu on the left (as depicted in the image above) and select Insert 🡪 Module to open a new module window.

FAQ3 - Step2

3: Once the Module 1 window opens, type the VBA code, shown in the below image, to display the required row numbers in the target cells C2:C6.

Sub Excel_ROW_Fn()
Dim rn As Worksheet
Set rn = Worksheets(“ROW_FAQ”)
rn.Range(“C2”) = rn.Range(“A2”).Row
rn.Range(“C3”) = rn.Range(“A3”).Row
rn.Range(“C4”) = rn.Range(“A4”).Row
rn.Range(“C5”) = rn.Range(“A5”).Row
rn.Range(“C6”) = rn.Range(“A6”).Row
End Sub

FAQ3 - Step3

4: Next, click the Run Sub/UserForm option in the menu to execute the commands.

FAQ3 - Step4

5: Finally, open the worksheet to view the output with the row numbers displayed in column C.

FAQ3 - Step5

Likewise, suppose we have to show the row number of a cell range, say A2:C6, in the target cell C6. Then the VBA code will be as shown in the image below:

Sub Excel_ROW_Fn()
Dim rn As Worksheet
Set rn = Worksheets(“ROW_FAQ”)
rn.Range(“C2”) = rn.Range(“A2”).Row
rn.Range(“C3”) = rn.Range(“A3”).Row
rn.Range(“C4”) = rn.Range(“A4”).Row
rn.Range(“C5”) = rn.Range(“A5”).Row
rn.Range(“C6”) = rn.Range(“A2:C6”).Row
End Sub

FAQ3-1

And the new output will be:

FAQ3-2

Cell C6 shows row number 2, the topmost row in the cell range, A2:C6.

4. What is the difference between the ROW and ROWSfunctionsn in Excel?

The difference between the ROW and ROWS functions in Excel is that the ROW() function gives the row number of the specified cell or cell range reference. On the other hand, the ROWS() function determines the number of rows in the specified reference as a number.

Download Template

📥Download the ready-to-use Excel template to practice this tutorial yourself.

Download Excel Template

This has been a guide to ROW Function in Excel. Here we use formula with MOD, INT, HLOOKUP, INDEX, MATCH, formatting, examples & downloadable excel template. You can learn more from the following articles –