VLookup & Hlookup

VLOOKUP:

  • It is a excel function used to search for a value you specify and returns a matching value from another column.
  • It is used when the table is setup vertically.
  • Syntax:  =VLOOKUP(lookup_value, table_array, column_index_num, range_lookup)
Argument Discription
lookup_valueThe value to be found in the first column of the array.
table_arrayThe table of information in which data is looked up.
column_index_numThe column number in the table array for which the matching value should be returned.
range_lookupTrue/1 for appropriate value.
False/0 for exact match.
Note: If true then the values in first column must be sorted in ascending order.

Example:


HLOOKUP:

  • Searches for value in the top row of a table and returns a value in the same column from a row specified in the table.
  • Exactly functions same as vlookup.
  • Used when the table is setup horizontally.
  • vlookup is mostly used than hlookup because mostly tables are in vertical setup.
  •  Syntax:  =HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)
Argument Discription
lookup_valueThe value to be found in the first row of the array.
table_arrayThe table of information in which data is looked up.
row_index_numThe row number in the table array for which the matching value should be returned.
range_lookupTrue/1 for appropriate value.
False/0 for exact match.
Note: If true then the values in first row must be sorted in ascending order.

Example:


Previous
Next Post »