# ROW function

From Apache OpenOffice Wiki

## ROW

Returns the row number(s), given a reference.

### Syntax:

**ROW(reference)**

- returns the row number of
, where**reference**is a reference to a cell.**reference**

- If
is omitted, the row number of the current cell (containing the formula) is returned.**reference**

- If
is a range of cells**reference**__and__the formula is entered as an array formula (by pressing Ctrl + ⇧ Shift + ↵ Enter rather than ↵ Enter ) a single column array of row numbers is returned.

### Example:

**ROW(B3)**

- returns
. Cell B3 is on the third row.**3**

**ROW()**

- if entered in cell D2, returns
. Cell D2 is on the second row.**2**

` ROW(D5:D8)` (entered with the ↵ Enter key)

- returns
. This is**5**__not__an array formula, so the row number of the first cell D5 is returned.

` ROW(D5:D8)` (entered with Ctrl + ⇧ Shift + ↵ Enter )

- returns the single column array
, as this**{5; 6; 7; 8}**__is__an array formula. If this formula is entered in cell A1, A1 will display, A2**5**, A3**6**and A4**7**.**8**

**See Also**