# Difference between revisions of "Documentation/How Tos/Calc: ROW function"

From Apache OpenOffice Wiki

< Documentation | How Tos

OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
m |
||

Line 35: | Line 35: | ||

* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||

* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||

− | [[Category: Documentation/Reference/Calc]] | + | [[Category: Documentation/Reference/Calc/Spreadsheet functions]] |

## Revision as of 11:35, 17 May 2010

## 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**