Return how many rows (or columns) a range spans.
Copy this formula
=ROWS(A2:A100)ROWS counts the rows in a reference and COLUMNS counts the columns — regardless of whether cells are filled. They're useful for building dynamic formulas and checking array sizes.
=COLUMNS(A1:F1)→6The range is six columns wide.
=ROWS(B5:B24)→20B5 to B24 spans 20 rows.
=ROWS(A1:C10)*COLUMNS(A1:C10)→30Total number of cells in a range of 10 rows and 3 columns.
ROWS counts the size of the reference; COUNTA counts how many cells actually contain data.
Use =COUNTA(A2:A100). It counts the non-empty cells, while ROWS counts every row in the reference.
Use =SUBTOTAL(103, A2:A100). Function 103 counts non-empty cells and skips rows hidden by a filter.
ROW returns the row number of a cell, so =ROW(A5) is 5. ROWS returns how many rows a range contains.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.