Documentation/Calc Functions/ROW

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

ROW

Category:

Spreadsheet

Summary:

Gives the row number of a cell reference. If the reference is a cell, it returns the row number of the cell. If the reference is a cell range, it returns the corresponding row numbers in a one-column array if the formula is entered as an array formula. If the ROW function with a range reference is not used in an array formula, only the row number of the first range cell will be returned.

Syntax:

ROW([Reference])

Returns:

Returns a positive whole number ranging from 1 to 1,048,576 or a column array containing those numbers which is/are the row number(s) of a cell reference(s).

Arguments:

Reference is the reference to a cell or cell area whose first row number is to be found.

  • If no reference is entered, the row number of the cell in which the formula is entered is found. LibreOffice Calc automatically sets the reference to the current cell.

Additional details:

None

Examples:

Formula Description Returns
=ROW(B1) Row 1 is the first row in the table. 1
=ROW(C3:E8) Row 3 is the third row in the table. Here, the ROW function is not used as an array formula and only the number of the first row of the reference is returned. 3
{=ROW(D5:D8)} Here the reference specified contains rows 5 through 8. (5, 6, 7, 8) (returned as a single-row array)
{=ROW(A1:E1)} or =ROW(A1:E1) Here both return the reference only contains row 1 as the first row in the table. (Because single-row areas only have a one-row number it does not make any difference whether or not the formula is used as an array formula.) 1
=ROW() where this formula is entered in row 3 By default current cell containing the formula is considered by the function. 3
{=ROW(Rabbit)} here the function is passed as an array function and "Rabbit" is the named area (C1:D3) The function returns a single-column array for the passed names area considering multiple rows since the named area is used. (1, 2, 3) (returned as a single-row array)

Related LibreOffice functions:

COLUMN

SHEET

ODF standard:

Section 6.13.29, part 2

Equivalent Excel functions:

ROW