Product: Spreadsheet
Type: new
Title: LOOKUP in columns of a row if range is wider than tall
Posted by: [EMAIL PROTECTED]
Affected: sc
TaskId: i74245
<http://www.openoffice.org/issues/show_bug.cgi?id=74245>
Effective from: cws odff03
CWS:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/odff03
CWS status: new
*Flags*
-------
API/ BASIC [ ]
Configuration [ ]
File format change [ ]
Help/ Guide [ ]
Performance test [ ]
Translation [ ]
UI relevant [ ]
*Description*
-------------
The LOOKUP() spreadsheet function's lookup direction now depends on
the width of the search array (first parameter, Searched) given.
There are two major uses for this function; the 3-parameter version
(vector) and the 2-parameter version (non-vector array).
When given two parameters, Searched is first examined:
- If Searched is square or is taller than it is wide (more rows than
columns), LOOKUP searches in the first column (similar to VLOOKUP),
and returns the corresponding value in the last column.
- If Searched covers an area that is wider than it is tall (more columns
than rows), LOOKUP searches in the first row (similar to HLOOKUP), and
returns the corresponding value in the last row.
When given 3 parameters, Results must be a vector (either a row or
a column) or an error is raised. The function determines the index of
the match in the first column respectively row of Searched, and returns
the value in Results with the same index.
Searched is first examined:
- If Searched is square or is taller than it is wide (more rows than
columns), LOOKUP searches in the first column (similar to VLOOKUP).
- If Searched covers an area that is wider than it is tall (more columns
than rows), LOOKUP searches in the first row (similar to HLOOKUP).
The lengths of the search vector and the result vector do not need to be
identical. When the match position falls outside the length of the
result vector, an error is returned if the result vector is given as an
array object. If it is a cell range, it gets automatically extended to
the length of the searched vector, but in the direction of the result
vector. If just a single cell reference was passed, a column vector is
generated. If the cell range cannot be extended due to the sheet's size
limit, then a NA() error is returned.
This aligns with the behavior of other spreadsheet applications and the
definition given in the OASIS ODFF/OpenFormula specification available at
http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula
Send feedback to [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]