HLOOKUP Function - Excel


Overview


The HLOOKUP function in Excel stands for “Horizontal Lookup” and it is a useful tool to search for a specific value in the first row of a range (table or array) and then return a corresponding value from a specified row within that range.

An example of the HLOOKUP function in Excel

Example:

=HLOOKUP(C4, C1:G2, 2, FALSE)

Syntax:

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

lookup_value: The value to search for in the first row of the table.

table_array: The range of cells that contains the data. It should include the row with the lookup_value and the rows containing the data to be searched.

row_index_num: The row number in the table_array from which to retrieve the value.

[range_lookup]: An optional argument. If TRUE or omitted, HLOOKUP will find an approximate match. If FALSE, it will find an exact match.


Example


In the example above, the HLOOKUP function is used to find the value of the “West” code from the table in C1:G2. The first input is “West” which is the value we want to look for in the table. The second input is C1:G2, which is the table we want to search for “West” in. The third input is 2 because we want to return the value in the 2nd row of the table. The fourth and final input is “FALSE” because we want the lookup value to be an exact match before returning anything. The final output is 4 which is under the “West” value.


Interactive GSheet