Excel function

ROWfunction

Returns the row number of a cell.

All versions
=ROW(C3)
A
B
C
D
1
2
3
4
5
6

Click a cell in the table to change reference. Click other cells. You get the row number regardless of the value. Try breaking it on purpose to see the errors.

Result

3

reference
C3You can also click a cell in the table

The cell whose row number you want. Click any cell. If omitted, the cell containing the formula is used.

What is the ROW function?

=ROW([reference])

ROW returns the row number of a cell. It returns a position, not the value in the cell.

If you omit the reference, it returns the row of the cell that holds the formula. That makes =ROW()-1 a common way to number a list.

ROW supplies "which row am I on" to a formula: running numbers, shading every other row, or taking every n-th row with INDEX. It returns a position rather than a value, so numbering fixes itself when rows are inserted or deleted.

Arguments

reference
Optional. The cell whose row number you want.

ROW examples

  1. Example 1. Row number

    =ROW(C3)

    3.

  2. Example 2. Number a list

    =ROW()-1

    Put it in row 2 and copy down for 1, 2, 3…. Numbers stay in order when you delete rows.

  3. Example 3. What ROW returns

    =ROW()

    Without an argument, it is the row of the cell holding the formula.

    FormulaEntered inResult
    =ROW(C3)anywhere3
    =ROW()A55
    =ROW()-1A21
    =ROW()-ROW($A$1)A21
  4. Example 4. Every third row

    =INDEX($B$2:$B$100, (ROW(A1)-1)*3+1)

    Copied down, it returns B2, B5, B8 and so on.

Common mistakes

FAQ

Column number?
Use COLUMN.
Number of rows?
Use ROWS.
Shade every other row?
Use =MOD(ROW(), 2)=0 in conditional formatting.