Lookup & Reference
ROW Function in Excel
Returns the row number of a reference.
Syntax
- =ROW([reference])
Arguments
- reference (optional): Cell or range reference (default: current cell)
Examples
- =ROW() - Current row number - Result: Row number
- =ROW(B5) - Row number of B5 - Result: 5
Excel ROW function documentation
- ROW returns the row number of a reference.
- Syntax: =ROW([reference]). No reference → row of formula cell.
- Use for serial numbering, dynamic offsets, and INDEX row component.
- Related: [COLUMN](/functions/column/), [ROWS](/functions/rows/), [ROW](/functions/row/), [ADDRESS](/functions/address/).
ROW syntax
- reference omitted — current row number.
- Single cell: =ROW(5:5) returns 5.
- Range returns top row number of range.
- ROW()+n patterns for incrementing IDs when copied down.
Step-by-step: auto serial in column A
- Step 1 — In A2: =ROW()-1 assuming header row 1.
- Step 2 — Copy down for 1,2,3,... IDs.
- Step 3 — Or =ROW()-ROW($A$2)+1 stable when pasted elsewhere.
- Step 4 — Prefer [SEQUENCE](/functions/sequence/) in 365 for explicit count.
- Step 5 — Do not use ROW for stable IDs if rows inserted — use MAX+1 or SEQUENCE.
ROW vs ROWS vs SEQUENCE
- ROW — index position on sheet.
- ROWS — count of rows in range.
- SEQUENCE — generated 1..n array.
- Lookup hub: [/categories/lookup-reference/](/categories/lookup-reference/).
Worked examples to copy
- Current row: =ROW().
- Row of B10: =ROW(B10).
- Serial: =ROW()-1.
- With INDEX: =INDEX(A:A, ROW()).
People also ask
- ROW changes when insert row? — Yes — serial breaks; use SEQUENCE or table formulas.
- ROW on whole row 5:5? — Returns 5.
- ROW structured table? — Reference specific cell in row.
- ROW Google Sheets? — ROW([cell]) works.
Common errors
- Returns first row if range given
Use cases
- Sequential numbering
- Dynamic references
- Array formulas
Frequently asked questions
- How do I create auto-numbering that adjusts when rows are deleted? Use =ROW()-ROW($A$1) where $A$1 is your header row. This creates relative numbering that auto-adjusts. For tables, =ROW()-ROW(Table1[#Headers]) works perfectly and updates when rows are added or removed.
- How do I use ROW in array formulas? ROW can generate sequences: =ROW(1:10) returns {1;2;3;4;5;6;7;8;9;10}. Useful for creating dynamic arrays or as a counter in complex formulas. In newer Excel, SEQUENCE is often better for this purpose.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.
When to use ROW
- Sequential numbering — common Lookup & Reference scenario for ROW.
- Dynamic references — common Lookup & Reference scenario for ROW.
- Array formulas — common Lookup & Reference scenario for ROW.
ROW in the Lookup & Reference category
- Browse all Lookup & Reference functions at /categories/lookup-reference/ for related formulas.
- ROW syntax: =ROW([reference])
- reference (optional): Cell or range reference (default: current cell)
- Confirm ROW arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
Formula checklist before you copy down
- Confirm ROW arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
- If results look wrong, check for text stored as numbers and invisible spaces with TRIM.
- Spot-check three known input rows manually against expected output.
Related Excel functions
- COLUMN (/functions/column/): Returns the column number of a reference.
- ROWS (/functions/rows/): Returns the number of rows in a reference or array.
- COLUMNS (/functions/columns/): Returns the number of columns in a reference or array.
Errors to watch for
- Returns first row if range given — review causes on linked error pages in the directory.
Copy-paste audit workflow
- Enter ROW on three test rows with known expected output documented on a QA tab.
- Fill down only after absolute references are locked on lookup tables and rate tables.
- Compare against manual calculation or a calculator for financial and statistical functions.
- Search this directory for comparison guides when choosing between similar functions in the same category.
ROW worked examples to copy
- =ROW() — Current row number. Expected result: Row number.
- =ROW(B5) — Row number of B5. Expected result: 5.
ROW reference summary for crawlers and offline review
- ROW belongs to the Lookup & Reference category in Excel. Returns the row number of a reference.
- Full syntax: =ROW([reference]). Open /functions/row/ for parameters, FAQs, and related pages.
- Common mistakes: Returns first row if range given
- Pair this function with comparison guides when another Excel formula might fit the same task better.
- Review fix-excel-formula-errors when unexpected errors appear after upgrading Excel or sharing across locales.