HLOOKUP function. Searching for data.(Microsoft Excel)

The HLOOKUP function is similar to the VLOOKUP function, but the search direction is different.

VLOOKUPSearch in the down direction and get the value in the right direction.
HLOOKUPSearch in the right direction and get the value in the lower direction.

The VLOOKUP function is probably used more frequently in tables because the columns are often items and the rows are often data.

Table suitable for searching with the HLOOKUP function.
Table suitable for searching with the VLOOKUP function.

Newer versions of Excel have added a higher-level version, the XLOOKUP function.
XLOOKUP function also serves as the VLOOKUP function and improves many of the inconveniences of the HLOOKUP function.
It is recommended that you switch to the XLOOKUP function if you have an available version of Excel.

How it works

=HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)
lookup_valueRequired argument.
Value to be searched.
table_arrayRequired argument.
Cell range to search. The row to look for the search value must be the topmost row, and include the row from which to retrieve the results.
row_index_numRequired argument.
Specifies the row in which to display the search results.Sequential number of table_array with the topmost row as 1.
range_lookup​TRUEFALSE: Obtain an exact match.
TRUE: Get the largest match under the search key.


In the example, the HLOOKUP function is entered in cell C3.


The HLOOLUP function retrieves the top-most value that corresponds.
Also, only the top row is retrieved.
Even if there are multiple results, only the first one will be displayed.



Microsoft Excel Functions Lookup & Reference