Excel Function: HLOOKUP

The Excel function HLOOKUP searches for a value in the first row of a table and then returns the value of a cell that is in the same column as the searched value.

Usage:

=HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)


Example of Use

The goal here is to look up information based on the case number. The user should be able to enter the case number in the green part and then see the result of his search in the blue part:

excel function hlookup

Select the HLOOKUP function and enter:

=HLOOKUP(B7,B1:K3,2,0)

hlookup function png

The name of the city is then displayed:

hlookup

To then display the points, simply copy the formula and change the row number (replace 2 with 3):

excel function hlookup tutorial table
If needed, you can download the Excel file used here: hlookup.xlsx
The HLOOKUP function searches for a value in the first row of a table, so the results cannot be above the search row. If you want to be able to search in a row that is not necessarily the first in the table, use the combination of functions INDEX + MATCH.