ROW vs ROWS Function in Excel Explained

Learn how to ROW and ROWS in excel step by step with simple examples.

Advertisement

Hello everyone! Today I compare ROW vs ROWS function in Excel with simple example, so you can choose right one for your work.

Many people confuse ROW and ROWS because name look almost same. But they do very different thing! No worry, I explain step by step, very easy to understand.

1. ROW Formula in Excel

ROW function return the row number of a cell. If you put cell A5 inside ROW, it give you back number 5 because A5 is in row 5.

Syntax:

=ROW([reference])
  • [reference] — Optional. The cell you want to know the row number. If you leave it empty, ROW return the row number of the cell where you type the formula.

Examples:

=ROW(A5)       → return 5
=ROW(C10)      → return 10
=ROW()         → return row number of current cell
=ROW(A1:A10)   → return {1,2,3,4,5,6,7,8,9,10} as array

Common use case — auto numbering:

If you want make row number that auto update when you insert or delete row, type this in column A:

=ROW()-1

Now if you are in row 2, it show 1. Row 3 show 2. Row 4 show 3. And if you delete a row, number update automatic!

💡 Tip: Use =ROW(A1) and drag down instead of typing 1, 2, 3, 4... manually. This way your number never go wrong and always stay in order.

2. ROWS Formula in Excel

ROWS function return how many rows are inside a range. You give it a range, it count and tell you total number of row in that range.

Syntax:

=ROWS(array)
  • array — Required. The range you want count the row of. Example: A1:A20 or B2:D10

Examples:

=ROWS(A1:A10)     → return 10   (10 rows from A1 to A10)
=ROWS(B2:D15)     → return 14   (14 rows from row 2 to row 15)
=ROWS(A1:Z1)      → return 1    (only 1 row, even many column)

Common use case — count total row in your data:

If your data is in A2:C50 and you want know how many data row you have:

=ROWS(A2:C50)

👉 Result: 49 — you have 49 row of data.

💡 Tip: ROWS is very useful when you use it inside other formula. For example, combine with INDEX to always reference the last row: =INDEX(A:A, ROWS(A2:A100)+1) — this always point to the row after your data range.

Advertisement

3. ROW vs ROWS — What is Difference?

ROWROWS
What it returnRow number of a cellTotal number of rows in a range
InputOne cell (optional)A range (required)
Common useAuto numbering, find row positionCount rows, use inside other formula
Work on old Excel?YesYes
Return array?Yes, if you give a rangeNo, always return one number

Simple rule to remember:

  • Use ROW when you want know where a cell is (position/number)
  • Use ROWS when you want know how many rows are in a range (count)

Examples

Example 1 — Auto Number List with ROW

You want create numbering 1, 2, 3, 4, 5... in column A that auto update when row is added or deleted:

In cell A2, type:

=ROW()-1

Drag down. Now column A show auto row number. If you insert row between, number update by itself. No more manual fix!


Example 2 — Count Your Data with ROWS

You have sale data in B2:B100 but not all row have data. You want know the size of your range:

=ROWS(B2:B100)

👉 Result: 99 rows in range. (This count the range size, not how many have data. To count non-empty cell, use COUNTA instead.)


Example 3 — Use ROW to Create Dynamic Array Number

You want create array of number {1, 2, 3, 4, 5} to use inside other formula:

=ROW(A1:A5)

This return {1, 2, 3, 4, 5} as array. Very useful when combine with LARGE, SMALL, INDEX for advance formula!

💡 Tip: =ROW(A1:A5) always return {1,2,3,4,5} no matter where you type it — because it reference A1 to A5 which is always row 1 to 5. Use this trick when you need fixed number array.

📚 Useful Resources

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement