What is the HLOOKUP Function in MS Excel?
HLOOKUP function in Excel stands for Horizontal Lookup. It is used to return a value from different rows in a column.
Purpose of HLOOKUP Function in Excel
The purpose of the HLOOKUP function in Excel is to retrieve data from a row in a table or array. It searches for the given value in the first row of the table. Then it returns the value in the same column from a row specified in the table or array.
Syntax of HLOOKUP Function
The syntax of the HLOOKUP function is written below.
=HLOOKUP (lookup_value, table_array, row_index_num, [range_lookup])
The arguments in the HLOOKUP function are described below.
Lookup_value: this is a reference, value, or text string in the first of the worksheet.
Table_array: this is a table comprised of different information and cells containing data to be looked up.
Row_index_num: this is to mention the row number in an array or table from where the value will be returned. The first row of the table is written as row_index_num of 1.
Range_lookup: this is a logical argument. It is used to specify whether you want to look for a perfect or an approximate match. TRUE means to look for an approximate match. FALSE means to look for an exact match.
=HLOOKUP (“Axles”, A1:C4, 2, TRUE)
The value to be looked up is ‘axles’. The table array is A1:C4. 2 is the row index number. True value means that an approximate match has to be looked up.