HLOOKUP Function
The HLOOKUP function is one of the lookup and reference functions. It is used to perform the horizontal search for a value in the top row of a table or an array and return the value in the same column based on a specified row index number.
Syntax
HLOOKUP (lookup_value, table_array, row_index_num, [range_lookup])
The HLOOKUP function has the following arguments:
Argument |
Description |
lookup_value |
A value to search for. |
table_array |
Two or more rows containing data sorted in ascending order. |
row_index_num |
A row number in the same column of the table_array, a numeric value greater than or equal to 1 but less than the number of rows in the table_array. |
range_lookup |
An optional argument. It is a logical value: TRUE or FALSE. Enter FALSE to find an exact match. Enter TRUE to find an approximate match, in this case if there is not a value that strictly matches the lookup_value, then the function will choose the next largest value less than the lookup_value. If this argument is absent, the function will find an approximate match. |
Notes
If the range_lookup is set to FALSE, but no exact match is found, then the function will return the #N/A error.
How to apply the HLOOKUP function.
Examples
The figure below displays the result returned by the HLOOKUP function.
![hlookup function gif](https://test-helpcenter.onlyoffice.com/OfficeWeb/apps/spreadsheeteditor/main/resources/help/en/images/hlookup_function.gif)
Return to previous page