The HLOOKUP function is one of the lookup and reference functions. It is used to perform the horizontal search for a value in the top row of a table or an array and return the value in the same column based on a specified row index number.
The HLOOKUP function syntax is:
HLOOKUP (lookup-value, table-array, row-index-num[, [range-lookup-flag]])
lookup-value is a value to search for.
table-array are two or more rows containing data sorted in ascending order.
row-index-num is a row number in the same column of the table-array, a numeric value greater than or equal to 1 but less than the number of rows in the table-array.
range-lookup-flag is an optional argument. It is a logical value: TRUE or FALSE. Enter FALSE to find an exact match. Enter TRUE to find an approximate match, in this case if there is not a value that strictly matches the lookup-value, then the function will choose the next largest value less than the lookup-value. If this argument is absent, the function will find an approximate match.
Note: if the range-lookup-flag is set to FALSE, but no exact match is found, then the function will return the #N/A error.
To apply the HLOOKUP function,
- select the cell where you wish to display the result,
- click the Insert Function icon situated at the top toolbar,
or right-click within a selected cell and select the Insert Function option from the menu,
or click the icon situated at the formula bar,
- select the Lookup and Reference function group from the list,
- click the HLOOKUP function,
- enter the required arguments separating them by comma,
- press the Enter button.
The result will be displayed in the selected cell.
Return to previous page