Contact

ROW Function in Google Sheets: Syntax, Examples & Troubleshooting

Lookup Intermediate Google Sheets

Return worksheet row coordinates, build relative record positions and expose all row numbers with an explicit array formula.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: ROW reports a worksheet row number. =ROW(C12) is expected to return 12 even if C12 contains text, a different number or nothing. It identifies a location rather than counting records.

Availability and version history

  • Introduced: Original introduction date is not established by the official history reviewed.
  • Availability: Documented in the rolling Google Sheets service. This guide covers ordinary worksheet formulas in the web workflow; it does not establish separate mobile or connected-database behavior.
  • Checked: October 14, 2026, against the official ROW reference. Documentation and independent calculations; no native application execution.

Syntax and the optional reference

=ROW([cell_reference])

Without a reference, ROW uses the cell containing the formula. For a range outside array-formula use, Google’s help describes returning its first row number. An explicit array formula can be used when the intended result is a list of row coordinates rather than a single coordinate.

Use ordinary cell references in these examples. Quoting "C12" would create text, not the direct reference illustrated here. Absolute-reference dollar signs affect copying behavior; they do not change the row’s current number.

Example 1: location is independent of contents

=ROW(C12)
=ROW(A2)
=ROW($F$25)

The expected results are 12, 2, 25. The column letters do not affect the row coordinate. If C12 contains 500, ROW(C12) is still 12; the function does not retrieve 500.

For a direct control, ROW(A12) and ROW(Z12) both return 12. This separates the row component of an address from its column component.

Example 2: use the containing cell

Enter =ROW() in H9, then enter the same formula in H14. The expected values are 9 and 14. These are two different outcomes for identical formula text because the optional reference was omitted.

If the formula is meant to identify a fixed record row, supply that reference explicitly. A self-location formula is appropriate for positional numbering but should not be mistaken for a permanent record identifier.

Example 3: first row versus number of rows

=ROW(C5:F8)

Outside an array formula, the expected single result is 5. The block begins in worksheet row 5 and spans four rows. Counting those four rows is the job of ROWS, not ROW.

This distinction matters when a table starts well below row 1. The first data record may be position one within the table while occupying worksheet row 5. Keep these two coordinate systems separate in lookup calculations.

Advanced example: create table-relative record positions

Put any four illustrative labels in B5:B8. In A5 enter:

=ROW(B5)-ROW($B$5)+1

Fill down through A8. The expected numbers are 1, 2, 3, 4. The current-row reference advances from B5 to B8; the starting-row reference remains fixed at B5. Subtracting five and adding one changes worksheet positions 5–8 into relative positions 1–4.

These labels describe current positions. Inserting rows, sorting records or changing the source block can alter which item receives each number. If records need immutable IDs, store genuine IDs rather than depending on their present row locations.

Advanced example: calculate the entire coordinate column

=ARRAYFORMULA(ROW(C5:C8))

The expected output is a four-row column 5, 6, 7, 8. Reserve all four output cells and compare every value. This explicitly requests array behavior using the ARRAYFORMULA wrapper.

For table-relative values in a single formula:

=ARRAYFORMULA(ROW(C5:C8)-ROW(C5)+1)

The expected column is 1, 2, 3, 4. Unlike copying the earlier formula down, this expression generates one multi-cell result from a single formula cell.

Example 4: alternating positional groups

For the original B5:B8 positions, enter and fill down:

=MOD(ROW(B5)-ROW($B$5),2)

The expected values are 0, 1, 0, 1. This can support an illustrative alternating-group rule. It does not know whether neighboring rows belong to the same customer or category; it alternates strictly by position. The MOD guide explains the remainder calculation.

Errors and verification

Inspect the exact reference and whether the formula is scalar or wrapped for array evaluation. A value that seems off by one often reflects a header row or a missing plus one, not a rounding problem.

All supplied coordinates and relative positions were independently calculated, not observed in a native Google Sheets session. Formulas use an English-locale comma separator when multiple arguments appear. To create a count-based list unrelated to current worksheet positions, consider SEQUENCE; for values at a chosen table-relative position see INDEX.

Official reference and testing scope