Lookup & Reference

ROW Formula

ROW returns the row number of a cell reference, or the row number of the cell where the formula resides if no argument is given. It is commonly used to create sequential numbering, drive formulas that vary by row, or determine a record's position in a list.

Syntax

ROW([reference])
ParameterDescription
[reference] (Optional.) Parameter of the ROW function.
Try ROW in Viztab — free, no signup

Examples

Auto-numbering

Formula
=ROW()-1
In row 2 returns 1, row 3 returns 2, etc. Subtracting the header row count creates a clean sequential ID column.

Get row of reference

Formula
=ROW(C15)
Returns 15 — the row number of cell C15. Useful in formulas that need to know where a particular cell sits.

Alternating row shading

Formula
=MOD(ROW(), 2)=0
Returns TRUE for even rows and FALSE for odd rows. Use this as a conditional formatting formula to create zebra stripes.

Common Errors

#VALUE!

ROW rarely errors, but will return #VALUE! if passed an invalid reference argument.

Tips

No argument = current row

=ROW() with no argument returns the row number of the cell containing the formula. This is the most common usage.

Sequential numbering

=ROW()-ROW($A$1) gives you a 0-based counter relative to your data start. Add 1 for 1-based numbering.

Combine with INDEX

ROW is often used with INDEX/MATCH to determine which row a match was found in, or to drive helper formulas that depend on position.

Try ROW in Viztab

Import your data and use ROW with 370+ other formulas. No signup required.

Open Viztab

Related Formulas