#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
Module 2
8 min

VLOOKUP & HLOOKUP

Learn how to find data in tables using VLOOKUP and HLOOKUP

VLOOKUP & HLOOKUP

These are two powerful functions that help you find information in a table.

Think of it like searching in a phone book. You know someone's name, and you want to find their phone number. VLOOKUP and HLOOKUP do exactly that in Excel.

What is the Difference?

VLOOKUP = Vertical Lookup. Searches DOWN a column. HLOOKUP = Horizontal Lookup. Searches ACROSS a row.

Most of the time, you will use VLOOKUP because data is usually organized in columns.

VLOOKUP: How It Works

You have a product list:

A (ID)B (Product)C (Price)
1101Apple50
2102Banana30
3103Orange40
3 rows

You want to find: What is the price of product 102?

VLOOKUP will:

  1. Search for 102 in the first column
  2. Find it in row 2
  3. Return the value from the Price column
  4. Answer: 30

VLOOKUP Formula

=VLOOKUP(what_to_find, table, column_number, 0)

Let us break it down:

PartMeaningExample
what_to_findThe value you are searching for102
tableThe range where your data isA1:C3
column_numberWhich column has the answer (count from 1)3 (Price column)
0Find exact match onlyAlways use 0
4 rows

Complete formula: =VLOOKUP(102, A1:C3, 3, 0)

Result: 30

Practice: Find Product Price

Easy

Find the price of product ID 2. Table is A1:C3, price is in column 3. Use 0 for exact match.

A
B
C
D
E
F
1
2
3
4
5
6

Step by Step: Using VLOOKUP

Problem: Find the price of product ID 102.

Step 1: What are you looking for? Answer: 102

Step 2: Where is your data table? Answer: A1:C3

Step 3: Which column has the answer? Count: A=1, B=2, C=3. Price is in column C, so: 3

Step 4: Write the formula =VLOOKUP(102, A1:C3, 3, 0)

Practice: Find Employee Salary

Easy

Find the salary of employee ID 102. Table is A1:C3, salary is in column 3. Use 0 for exact match.

A
B
C
D
E
F
1
2
3
4
5
6

HLOOKUP: How It Works

HLOOKUP is the same as VLOOKUP, but it searches horizontally (in a row).

You have data arranged in rows:

ABCD
1ProductAppleBananaOrange
2Price503040
2 rows

You want to find: What is the price of Banana?

Formula: =HLOOKUP("Banana", A1:D2, 2, 0)

HLOOKUP will:

  1. Search for "Banana" in the first row
  2. Find it in column C
  3. Return the value from row 2
  4. Answer: 30

Practice: Simple HLOOKUP

Easy

Find the price of Apple. Table is A1:C2, price is in row 2. Use 0 for exact match.

A
B
C
D
E
F
1
2
3
4
5
6

When to Use Which?

Use ThisWhen Data Is
VLOOKUPOrganized in columns (most common)
HLOOKUPOrganized in rows (less common)
2 rows

Common Mistakes

Mistake 1: Wrong column number You have 3 columns but you type 5. Excel will give an error.

Mistake 2: Forgetting FALSE Always add FALSE at the end. Without it, you might get wrong results.

Mistake 3: Search value not in first column VLOOKUP only searches the FIRST column of your table. Make sure your search value is there.

Summary

  • VLOOKUP searches down columns: =VLOOKUP(find, table, column, 0)
  • HLOOKUP searches across rows: =HLOOKUP(find, table, row, 0)
  • Always use 0 for exact match
  • Count columns/rows starting from 1
  • Search value must be in the first column (VLOOKUP) or first row (HLOOKUP)

These functions save hours of manual searching. Practice them and you will use them every day.

SkillsetMaster - AI, Web Development & Data Analytics Courses