Excel - ROW Function



ROW Function

The Excel ROW function will retrieve the row number of a cell reference. It takes only one argument, "Reference", which is optional. The Reference argument can specify only the single cell reference or range of cells. It is categorized under the Lookup and Reference functions in Microsoft Excel and is contrary to the COLUMN function. This versatile function can work seamlessly with other functions like INDIRECT, IF, MATCH, VLOOKUP, and array formulas.

For example, you may use the ROW function to generate a table of integer numbers, develop unique employee IDs, monitor the customer dataset, and highlight odd or even rows using conditional formatting.

Compatibility

This Advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the ROW function is as follows −

=ROW([reference])

Arguments

You can use the following arguments with the ROW function −

Argument Description Required / Optional
Reference

It specifies the cell reference or range upon which you fetch its row number.

If a reference is skipped, the ROW function fetches the row number of its current position.

Optional

Points to Remember

  • The ROW function was first introduced in Excel 2007.
  • If the ROW function is entered as a vertical array and supplied the specific range of cells in the reference arguments, ROW returns the series of row numbers vertically. However, #SPILL! error may occur if the data already exists where the result is being populated.
  • The ROW function cannot work efficiently with multiple cells. For example, =ROW({A2,A3,A4}) is invalid in excel.

What does ROW Function do in Excel?

The ROW function in Microsoft Excel efficiently finds the row number of a specific individual cell or cell range. Various steps are written below to utilize the ROW function in Excel.

1. Open a desired Excel worksheet.

2. Double-click on the specific cell, type the = sign, and then write the ROW(C2) in it. Note: you can also supply the cell range instead of the single-cell reference.

3. After that, press the Enter tab to get the row number of C2.

Examples of ROW Function

Practice the following example to learn the deployment of the "ROW" function in Excel.

Example 1: How to use the ROW Function in Excel?

In this example, we will apply the ROW function to extract the row number of the targeted cell reference and range of cells.

Solution

Step 1 − You may enter the formula =ROW(D5) in the B3 cell.

How to use ROW Function in Excel1

And then, press the Enter tab.

How to use ROW Function in Excel2

Step 2 − Moreover, double click on the B5 cell and enter the formula =ROW() in it.

How to use ROW Function in Excel3

After that, hit the Enter tab to obtain the resulting value.

How to use ROW Function in Excel4

Therefore, the row number 4

Example 2: How to Create a Table in Excel?

In this example, we will unveil the capability of the ROW function to generate a multiplication table 5.

Solution

Let's get started.

Step 1 − First, open a new Excel worksheet, select cell B1, and enter the formula =ROW(B1:B10)*5 in it.

How to Create a Table in Excel1

Step 2 − After that, press the Enter tab to obtain the resulting value.

How to Create a Table in Excel2

Therefore, the table for number 5 is generated by the ROW function in Excel.

Download Practice Sheet

You can download and use the sample data sheet to practice the ROW function.

Advertisements