Learn how to use the Excel HLOOKUP function with syntax and examples.
The Microsoft Excel HLOOKUP function performs a horizontal lookup by searching for a value in the top row of table_array and returning the value in the same column based on the index_number.
The syntax for the Microsoft Excel HLOOKUP function is:
HLOOKUP( value, table_array, index_number, [not_exact_match] )
value is the value to search for in the first row of the table_array.
table_array is two or more rows of data that is sorted in ascending order.
index_number is the row number in table_array from which the matching value must be returned. The first row is 1.
not_exact_match is optional. It determines if you are looking for an exact match based on value. Enter FALSE to find an exact match. Enter TRUE to find an approximate match, which means that if an exact match if not found, then the HLOOKUP function will look for the next largest value that is less than value. If this parameter is omitted, HLOOKUP will return an approximate match.
The HLOOKUP function can be used in the following versions of Microsoft Excel:
The HLOOKUP function can be used in Microsoft Excel as the following type of function:
Let's look at some Excel HLOOKUP function examples and explore how to use the HLOOKUP function as a worksheet function in Microsoft Excel:
Based on the spreadsheet above, the following Excel HLOOKUP function will return the following:
=HLOOKUP(10251, A1:G3, 2, FALSE) Result: $16.80 =HLOOKUP(10251, A1:G3, 3, FALSE) Result: 6 =HLOOKUP(10248, A1:G3, 2, FALSE) Result: #N/A =HLOOKUP(10248, A1:G3, 2, TRUE) Result: $14.00
(scroll to see more)