Lesson 1.8 – Lookup Functions (VLOOKUP, HLOOKUP, XLOOKUP, INDEX, MATCH)
1. Introduction
Lookup Functions in Excel are used to search and retrieve data from a table or range based on specific criteria.
They are essential for data analysis, reporting, and automation.
A. VLOOKUP (Vertical Lookup)
Purpose: Looks for a value in the first column of a range and returns a value in the same row from another column.
Syntax:
-
lookup_value → value to search for
-
table_array → data range
-
col_index_num → column number to return data from
-
range_lookup → TRUE (approximate) or FALSE (exact match)
Example:
Find the price of “Laptop” in a product list:
B. HLOOKUP (Horizontal Lookup)
Purpose: Looks for a value in the first row of a range and returns a value in the same column from another row.
Syntax:
-
Works like VLOOKUP but horizontally.
Example:
Find the sales in “March” from a horizontal sales table:
C. XLOOKUP (Advanced Lookup)
Purpose: Searches for a value in a range and returns a value from another range without the column number limitation.
Syntax:
-
No need for column/row numbers.
-
Can search from first or last value.
Example:
Find the price of “Tablet”:
D. INDEX Function
Purpose: Returns the value of a cell based on row and column number from a range.
Syntax:
-
Flexible and powerful when combined with MATCH.
Example:
Get the 3rd row, 2nd column value from range A1:C5:
E. MATCH Function
Purpose: Returns the position of a value in a range.
Syntax:
-
match_type: 0 = exact, 1 = less than, -1 = greater than
Example:
Find the position of “Printer” in range A2:A10:
F. INDEX + MATCH Combination
Why use it?
-
More flexible than VLOOKUP (can look left).
-
No limitation of first column requirement.
Example:
Find price of “Printer” using INDEX + MATCH:
Key Points & Tips
-
VLOOKUP is easy but less flexible.
-
INDEX + MATCH works in both directions (left & right).
-
XLOOKUP is modern and replaces both VLOOKUP & HLOOKUP.
-
Use FALSE in VLOOKUP/HLOOKUP for exact matches.
Practice Questions – Lesson 1.8
-
Use VLOOKUP to find the marks of “Rahul” in a student table.
-
Use HLOOKUP to find sales in “April” from a horizontal sales table.
-
Use XLOOKUP to find the email of “Neha” from a contact list.
-
Use INDEX + MATCH to get the department name of “Amit” from an employee table.
