Advanced Excel
About Lesson

Function: HLOOKUP()


🧭 Purpose:

The HLOOKUP() function (Horizontal Lookup) searches for a value in the first row of a table and returns a value from another row in the same column.

It works just like VLOOKUP(), but horizontally — perfect when your data is organized across columns instead of down rows.


🧮 Syntax:

 
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Parameters:

Parameter Description
lookup_value The value you want to search for (e.g., Month Name, Student ID).
table_array The range that contains the lookup value in its first row.
row_index_num The row number (from the top of table_array) from which to return a value.
[range_lookup] Optional: Use FALSE for an exact match, TRUE for an approximate match.

📘 Explanation:

Imagine your data runs left to right (month names across the top).
HLOOKUP searches the top row, finds the match, and returns the value from the row you specify.

Example:

 
=HLOOKUP("Mar", A1:G3, 3, FALSE)

✅ This looks for “Mar” in the first row (A1:G1) and returns the value from the 3rd row of the matching column.


📊 Example 1: Monthly Sales Record

Month Jan Feb Mar Apr May
Product Sold 120 150 180 130 160
Revenue (₹) 60000 75000 90000 65000 80000

Formula:

 
=HLOOKUP("Mar", A1:F3, 3, FALSE)

✅ Result → 90000

📈 It finds “Mar” in the first row and returns the revenue from the 3rd row.


🏫 Example 2: Student Attendance Summary

Student Name Riya Kunal Arnav Sneha
Present Days 24 26 23 28
Absent Days 6 4 7 2

Formula:

 
=HLOOKUP("Kunal", A1:E3, 3, FALSE)

✅ Result → 4 (Absent days for Kunal)


⚙️ Pro Tips

  • Use FALSE for exact matches — TRUE often gives wrong results unless sorted.

  • Lock table references:
    =HLOOKUP(A2, $A$1:$F$3, 3, FALSE)

  • Combine with IFERROR() to avoid errors:
    =IFERROR(HLOOKUP(A2, $A$1:$F$3, 3, FALSE), "Not Found")


🧩 Project Tasks for Students


🧠 Project 1 (Basic): Student Marks Extractor

Subject English Math Science History Computer
Riya 78 82 88 70 90
Kunal 85 91 89 80 86
Arnav 70 76 79 67 75

🎯 Task: Create a formula that finds Riya’s marks in Computer using HLOOKUP.

👉 Formula:

 
=HLOOKUP("Computer", A1:F4, 2, FALSE)

✅ Result → 90


🏪 Project 2 (Basic): Shop Daily Sales Lookup

Day Mon Tue Wed Thu Fri Sat
Sales (₹) 5200 5800 4900 6100 5600 6400
Customers 45 50 42 60 55 63

🎯 Task: Find Thursday’s total customers.

Formula:

 
=HLOOKUP("Thu", A1:G3, 3, FALSE)

✅ Result → 60


💼 Project 3 (Intermediate): Quarterly Profit Dashboard

Quarter Q1 Q2 Q3 Q4
Sales (₹ in Lakh) 25 32 28 35
Expenses (₹ in Lakh) 10 14 12 15
Profit (₹ in Lakh) 15 18 16 20

🎯 Task:
Create a dynamic cell (G1) where user enters a quarter (like “Q3”), and use HLOOKUP to fetch:

  • Total Sales

  • Total Expenses

  • Total Profit

👉 Example:

 
=HLOOKUP(G1, A1:E4, 4, FALSE)

✅ Result (for Q3) → 16 Lakh

💡 Try combining this with IFERROR() and conditional formatting for a professional dashboard.


🧮 Project 4 (Hard): Regional Sales Report with Dynamic Input

Region East West North South
Sales Q1 (₹) 120000 140000 110000 90000
Sales Q2 (₹) 150000 135000 125000 105000
Sales Q3 (₹) 160000 142000 135000 115000
Sales Q4 (₹) 170000 155000 140000 130000

🎯 Task:

  1. Create an input cell for Region (like “South”).

  2. Create another for Quarter (like “Q3”).

  3. Use HLOOKUP() with a combination of MATCH() to make the lookup fully dynamic.

👉 Formula:

 
=HLOOKUP(G2, A1:E5, MATCH(G3, A1:A5, 0), FALSE)

✅ If G2 = “South” and G3 = “Sales Q3 (₹)”, the result → 115000

💡 This makes your lookup flexible to both row and column changes — perfect for dashboards.


🏦 Project 5 (Hard): Bank Interest Rate Analyzer

Loan Type Home Car Education Personal
Interest 2023 (%) 8.1 9.2 7.3 10.8
Interest 2024 (%) 8.3 9.5 7.5 11.0
Interest 2025 (%) 8.4 9.6 7.6 11.2
Loan Duration (Years) 20 7 10 5

🎯 Task:
Create a dynamic dashboard where user inputs:

  • Loan Type (e.g., “Car”)

  • Year (e.g., “2024”)

and HLOOKUP returns the correct Interest Rate.

👉 Formula:

 
=HLOOKUP(G2, A1:E5, MATCH(G3, A1:A5, 0), FALSE)

✅ Output: 9.5%

💡 Combine this with Data Validation lists for a smooth user interface.


Key Tip:
Use HLOOKUP() + MATCH() to make your lookups flexible for future changes — ideal for report automation and dashboards.