Documentation/How Tos/Calc: HLOOKUP function

From Apache OpenOffice Wiki
< Documentation‎ | How Tos
Revision as of 17:14, 3 May 2008 by Drking (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


HLOOKUP

Returns a value from a table row, in the column found by lookup in the first row.

Syntax:

HLOOKUP(value; datatable; rowindex; mode)

value is a value (number, text or logical value) to look up in the top row of the range datatable. When a value is matched in the top row, HLOOKUP returns the corresponding value (in the same column) in row rowindex of datatable, where rowindex = 1 is the top row.
If mode is 0 or FALSE, the top row of datatable may be unordered, and the first exact match is found (searching left to right).
If mode is 1 or TRUE or is omitted, the top row of datatable must be sorted, with numbers in ascending order appearing before alphabetically sorted text values. Firstly an exact match is sought; if there is more than one exact match, the one found is not necessarily the leftmost. If there is no exact match, the position to the left of where value would appear on the top row is found; the #N/A error results if that position is not in the table.

Example:

HLOOKUP()

returns .

See also:

CHOOSE, INDEX, LOOKUP, MATCH, OFFSET, VLOOKUP

Spreadsheet functions

Personal tools