ROW
Return the row number of a reference, or of the cell the formula is in.
Syntax
ROW([reference]) | Argument | Required | Description |
|---|---|---|
reference | Optional | A cell or range. Omit it for the formula's own row. |
Examples
Every example below was executed against VisiGrid engine 0.54.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=ROW(C5) | 5 | |
=ROW(A2:A4) | 2 | For a range, the first row. |
=ROW()>0 | TRUE | With no reference, the row the formula sits in. |
Numbering rows
=ROW()-1 in row 2, filled down, numbers a list 1, 2, 3… and keeps numbering
correctly when rows are sorted or deleted, which typed numbers do not.
Every other row
With MOD, ROW() picks out alternate rows — for banding in
conditional formatting, or for taking every Nth record:
=MOD(ROW(),2)=0
ROW or ROWS
ROW is where a cell is. ROWS is how many rows a
range spans.
Excel compatibility
Matches Excel for single cells and the first row of a range.