The HLOOKUP() Function
The HLOOKUP() function is similar to VLOOKUP(), except that it searches for the lookup value in the first row of a table. (The H in HLOOKUP() stands for horizontal.) If successful, this function then looks down the specified number of rows and returns the value it finds there. Here's the syntax for HLOOKUP():
HLOOKUP(lookup_value, table_array, row_index_num[, range_lookup])
lookup_value | This is the value you want to find in the first row of table_array. You can enter a number, string, or reference. |
table_array | This is the table to use for the lookup. You can use arange reference or a name. |
row_index_num | If HLOOKUP() finds a match, row_index_num is the row number in the table that contains the data you want returned (the first row-that is, the lookup row-is 1, the second row is 2, and so on). |
range_lookup | This is a Boolean value that determines how Excel searches for lookup_value in the first row: TRUE-VLOOKUP() searches for the first exact match for lookup_value. If no exact match is found, the function looks for the largest value that is less than lookup_value (this is the default). FALSE-VLOOKUP() searches only for the first exact match for lookup_value. |