Difference between revisions of "Documentation/How Tos/Calc: INDEX function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
(→See also:) |
||
Line 38: | Line 38: | ||
'''[[Documentation/How_Tos/Calc: Spreadsheet functions|Spreadsheet functions]]''' | '''[[Documentation/How_Tos/Calc: Spreadsheet functions|Spreadsheet functions]]''' | ||
+ | |||
+ | [[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']], | ||
+ | [[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 12:57, 13 September 2008
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, column in the range or array datatable.
- If datatable has multiple ranges then areanumber specifies which is to be used. areanumber is optional and defaults to 1.
- If datatable has a single column, this syntax may be used:
INDEX(datatable; row)
Example:
If cells B1, B2, B3 contain 5, red and 6 and cells C1, C2, C3 contain TRUE, 3 and 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.
See also:
CHOOSE, HLOOKUP, LOOKUP, MATCH, OFFSET, VLOOKUP
Functions listed alphabetically, Functions listed by category
Issues:
- Calc cannot yet handle empty parameters, so for example INDEX(multirange; 3; ; 2) will fail.
- If datatable has a single row, the ODFF standard implies that the syntax INDEX(datatable; column) may be used. This is to be implemented in Calc (issue 78781)