ROW Function in Excel: Row Number of a Cell

ROW Function in Excel: Row Number of a Cell featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 28 September 2026

LookupLevel: BeginnerAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. ROW in practice
  6. Where you will use it
  7. Worked example
  8. Mistakes people make
  9. Related functions
  10. Continue learning

ROW returns the row number of a reference (or of the cell it is in). It is the quiet engine behind serial numbers and many array tricks.

Advertisement

Syntax

=ROW([reference])
Argument What it means
reference Optional cell; omitted = the formula’s own row.

Examples

Example 1

=ROW()-1

Serial numbers that stay correct when rows are sorted or deleted (header in row 1).

Example 2

=MOD(ROW(),2)=0

Conditional-formatting rule for banded rows.

ROW in practice

Where you will use it

  • Automatic serial numbers
  • Alternate row shading with ISEVEN(ROW())
  • Position calculations in lookups

Worked example

Cell referenceFormulaResult
A1=ROW(INDIRECT(A2))1
B10=ROW(INDIRECT(A3))10
C1048576=ROW(INDIRECT(A4))1048576

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Serial numbers that start wrongUse ROW()-1 when data starts on row 2
Insert rows above the tableUse ROW()-ROW($A$1) for stability

ROWS Β· COLUMN Β· SEQUENCE

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Lookup & reference17 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong