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

From Apache OpenOffice Wiki

< Documentation | How Tos

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

Line 29: | Line 29: | ||

: returns <tt>'''TRUE'''</tt>. | : returns <tt>'''TRUE'''</tt>. | ||

− | + | {{Documentation/SeeAlso| | |

− | + | * [[Documentation/How_Tos/Calc: CHOOSE function|CHOOSE]] | |

− | + | * [[Documentation/How_Tos/Calc: HLOOKUP function|HLOOKUP]] | |

− | + | * [[Documentation/How_Tos/Calc: LOOKUP function|LOOKUP]] | |

− | + | * [[Documentation/How_Tos/Calc: MATCH function|MATCH]] | |

− | + | * [[Documentation/How_Tos/Calc: OFFSET function|OFFSET]] | |

− | + | * [[Documentation/How_Tos/Calc: VLOOKUP function|VLOOKUP]]''' | |

− | + | * [[Documentation/How_Tos/Calc: Spreadsheet functions|Spreadsheet functions]]''' | |

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

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

=== Issues: === | === Issues: === | ||

*Calc cannot yet handle empty parameters, so for example <tt>'''INDEX(multirange; 3; ; 2)'''</tt> will fail. | *Calc cannot yet handle empty parameters, so for example <tt>'''INDEX(multirange; 3; ; 2)'''</tt> will fail. | ||

*If <tt>'''datatable'''</tt> has a single row, the ODFF standard implies that the syntax <tt>'''INDEX(datatable; column)'''</tt> may be used. This is to be implemented in Calc (issue 78781) | *If <tt>'''datatable'''</tt> has a single row, the ODFF standard implies that the syntax <tt>'''INDEX(datatable; column)'''</tt> may be used. This is to be implemented in Calc (issue 78781) |

## Revision as of 13:56, 25 February 2009

## INDEX

Returns a value from a table, given a row and column number.

### Syntax:

**INDEX(datatable; row; column; areanumber)**

- returns the value at position
,**row**in the range or array**column**.**datatable**

- If
has multiple ranges then**datatable**specifies which is to be used.**areanumber**is optional and defaults to**areanumber**.**1**

- If
has a single column, this syntax may be used:**datatable**

**INDEX(datatable; row)**

### Example:

If cells ` B1`,

`,`

**B2**`contain`

**B3**`,`

**5**`and`

**red**`and cells`

**6**`,`

**C1**`,`

**C2**`contain`

**C3**`,`

**TRUE**`and`

**3**`:-`

**blue****INDEX(B1:C3; 1; 1)**

- returns
.**5**

**INDEX(B1:C3; 3; 2)**

- returns
.**blue**

**INDEX(B1:B3; 2)**

- returns
.**red**

**INDEX(B1:C2 1; 2)**

- returns
.**TRUE**

Template:Documentation/SeeAlso

### Issues:

- Calc cannot yet handle empty parameters, so for example
will fail.**INDEX(multirange; 3; ; 2)** - If
has a single row, the ODFF standard implies that the syntax**datatable**may be used. This is to be implemented in Calc (issue 78781)**INDEX(datatable; column)**