What is 'HLOOKUP'? How it is different from 'VLOOKUP'? Explain its syntax.
Show Hint
HLOOKUP searches the first row of a table and returns a value from the same column. VLOOKUP searches the first column instead. Write the four-argument syntax.
Step 1: Split the question into three tasks:
Task one is the meaning of HLOOKUP. Task two is its difference from VLOOKUP. Task three is its syntax.
We take them in this order.
Step 2: Meaning in simple words:
The H stands for horizontal. The data runs across rows in the table.
HLOOKUP scans the top row of the table array for the lookup value.
Once it finds a match, it goes down that column and returns the value from the row number we give.
Step 3: Compare with VLOOKUP:
VLOOKUP matches the required value in a column of the range of cells.
After that it returns the value from any cell on the same row of the range.
HLOOKUP does the reverse. It matches in the first row and returns from the same column.
So the two functions differ in the direction of the search and in the place from which the answer is taken. This also changes the index argument from col_index_num to row_index_num.
Step 4: Syntax and arguments:
Syntax: HLOOKUP(lookup_value, table_array, row_index_num, range_lookup).
Argument
Role
lookup_value
The value to search for in the first row of the table array
table_array
Two or more rows of data. The values in the first row are the ones searched for lookup_value. They can be text, numbers or logical values, and upper and lower case are treated alike
row_index_num
The row number in table_array from which the matching value is returned. A row_index_num of 2 returns the value in the second row, and 3 returns the value in the third row, and so on
range_lookup
A logical value that says whether HLOOKUP should find an exact or an approximate match. If FALSE, a value is returned only if an exact match is found. If TRUE, the nearest match is used when an exact one is not found
Final Answer:
HLOOKUP is the horizontal lookup, which works across the first row. VLOOKUP is the vertical lookup, which works down the first column.
Syntax: HLOOKUP(lookup_value, table_array, row_index_num, range_lookup).