Excel ROW Function
ROW returns the row number for a reference or for the cell containing the formula.
Use it to build running numbers, position-based IDs, alternating row patterns, helper formulas, or calculations that need to know where a value sits on the worksheet.
ROW syntax & arguments
Syntax
=ROW([reference])
-
1
reference
OptionalThe cell or range whose row number should be returned. If omitted, ROW returns the row number of the cell containing the formula.
Example
=ROW(A2)
Return the row number of cell A2 (which is 2).
ROW caveats
-
Omitting the reference uses the formula cell
=ROW()returns the row number where the formula is entered. -
Inserted rows can change results
Because ROW reads worksheet positions, inserting or deleting rows can change formulas that depend on row numbers.
-
Range references can return multiple numbers
In modern Excel,
=ROW(A2:A5)spills one row number for each row in the range.
Need a lookup position? Use MATCH when a label or value should determine a relative position inside a list.
Intro ROW practice problem
Solve the intro problem directly here, or open it on its own page.
Advanced ROW practice problem
Use ROW alongside other Excel functions in realistic, less-prescriptive challenges.