ID EN
#Lookup and reference

HLOOKUP

Excel Functions

Look up a value in a table arranged horizontally

Syntax

EXCEL
=HLOOKUP(lookup_value, table_array, row_index, [range_lookup])

Arguments

Parameter Description
lookup_value The value to look up.
table_array The table from which to retrieve data.
row_index The row number from which to retrieve data.
range_lookup [optional] A Boolean to indicate exact match or approximate match. Default = TRUE = approximate match.

Return Value

The matched value from a table.

Details

The HLOOKUP function can locate and retrieve a value from data in a horizontal table. Like the "V" in VLOOKUP which stands for "vertical", the "H" in HLOOKUP stands for "horizontal". The lookup values must appear in the first row of the table, moving horizontally to the right. HLOOKUP supports approximate and exact matching, and wildcards (* ?) for finding partial matches. HLOOKUP searches for a value in the first row of a table. When it finds a match, it retrieves a value at that column from the row given. Use HLOOKUP when lookup values are located in the first row of a table. Use VLOOKUP when lookup values are located in the first column of a table. HLOOKUP takes four arguments. The first argument, called lookup_value, is the value to look up. The second argument, table_array, is a range

Examples

Example #1 - approximate match

In the example shown, the goal is to look up the correct Level and Bonus for the sales amounts in C5:C13. The lookup table is in H4:J6, which is the n

EXCEL
=HLOOKUP(C5,table,2,1) // get level
Example #1 - approximate match

To get Bonus, the formula in E5, copied down, is:

EXCEL
=HLOOKUP(C5,table,3,1) // get bonus
Example #2 - exact match

In the screen below, the goal is to look up the correct level for a numeric rating 1-4. In cell D5, the HLOOKUP formula, copied down, is:

EXCEL
=HLOOKUP(C5,table,2,FALSE) // exact match

See Also

VLOOKUP LOOKUP INDEX MATCH XLOOKUP XMATCH FILTER