Returns the number of rows in a reference or array.
ไวยากรณ์
ROWS(array)อาร์กิวเมนต์
arrayจำเป็น
An array, an array formula, or a reference to a range of cells for which you want the number of rows.
The ROWS function counts the total number of rows contained within a specified range or array. It is commonly used to determine the size of a dataset or to create dynamic ranges in complex formulas.
=ROWS(A1:B5)→5Calculates the number of rows in the range A1 through B5.
=ROWS({1,2;3,4;5,6})→3Calculates the number of rows in the provided constant array.
Select the cell
Click on the cell where you want to display the row count.
Enter the formula
Type =ROWS( and select the range or array you want to count, then close the parenthesis.
Yes, ROWS counts the physical number of rows in the range regardless of whether the cells contain data or are empty.