Excel HLOOKUP function

Summary

The HLOOKUP function finds a specific value in a horizontal array of data, based on a provided lookup value.

Formula

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

Arguments (inputs)

lookup_value = the value to look for in the data (in the first column), can be numeric or text

table_array = the table which contains the values to lookup as well as return (range of cells)

row_index_num = the column from which to return a value (a number)

range_lookup = [optional] TRUE = Approximate match, FALSE = Exact match

Return value

The HLOOKUP formula will return a value from the column defined by the col_index_num argument. The formula will return the value for the first matching reference, even if there are multiple matches.

Example

Excel HLOOKUP function example

In the example above the formula looks up the order number from the table in cells C5:F7.

=HLOOKUP(J6, C5:F7, 3, FALSE)

The lookup value is the sales representative listed in cell J6, Andrews. The table array is the entire data table, C5:F7. The row index number is 3, indicating that we want the result from the sales total row (3rd row in the table). FALSE indicates that we are looking for an exact match.

The formula returns the value from row 7, specifically the value from cell E7, $6,006.