ROW function

Returns the row number of a reference.

Syntax

ROW(reference)

Reference     is the cell or range of cells for which you want the row number.

  • If reference is omitted, it is assumed to be the reference of the cell in which the ROW function appears.

  • If reference is a range of cells, and if ROW is entered as a vertical array, ROW returns the row numbers of reference as a vertical array.

  • Reference cannot refer to multiple areas.

Example 1

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

  1. Create a blank workbook or worksheet.

  2. Select the example in the Help topic.

    Note   Do not select the row or column headers.

    Selecting an example from Help

    Selecting an example from Help

  3. Press CTRL+C.

  4. In the worksheet, select cell A1, and press CTRL+V.

  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

1

2

3

A

B

Formula

Description (Result)

=ROW()

Row in which the formula appears (2)

=ROW(C10)

Row of the reference (10)

Example 2

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

  1. Create a blank workbook or worksheet.

  2. Select the example in the Help topic.

    Note   Do not select the row or column headers.

    Selecting an example from Help

    Selecting an example from Help

  3. Press CTRL+C.

  4. In the worksheet, select cell A1, and press CTRL+V.

  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

1

2

3

4

A

B

Formula

Description (Result)

=ROW(C4:D6)

First row in the reference (4)

Second row in the reference (5)

Third row in the reference (6)

Note   The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the range A2:A4 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the single result is 4.

Applies To: Excel 2007



Was this information helpful?

Yes No

How can we improve it?

255 characters remaining

To protect your privacy, please do not include contact information in your feedback. Review our privacy policy.

Thank you for your feedback!

Support resources

Change language