If you work with spreadsheets for MIS reporting, sales tracking, or inventory lists, two lookup formulas come up constantly: VLOOKUP and HLOOKUP. Many Excel users know both exist, yet still get confused about which one searches columns, which one searches rows, and why one returns #N/A when used on the wrong table layout.
In this complete guide, you will learn the exact difference between VLOOKUP and HLOOKUP in Excel, their syntax side by side, step-by-step formula examples, and how to avoid common errors.
Quick Answer: How Do HLOOKUP and VLOOKUP Differ?
The core difference comes down to search direction:
- VLOOKUP (Vertical Lookup) searches for data vertically down the first column of a table and returns a matching value from a specified column to the right (
col_index_num). - HLOOKUP (Horizontal Lookup) searches for data horizontally across the first row of a table and returns a matching value from a specified row below (
row_index_num).
VLOOKUP vs HLOOKUP Comparison Table
| Feature | VLOOKUP | HLOOKUP |
|---|---|---|
| Full Name | Vertical Lookup | Horizontal Lookup |
| Search Direction | Top to bottom in the leftmost column | Left to right across the top row |
| Table Layout | Headers in the top row; records stacked in rows | Headers in the left column; records spread across columns |
| Index Argument | col_index_num (column number) |
row_index_num (row number) |
| Match Type | FALSE (0) = Exact, TRUE (1) = Approximate |
FALSE (0) = Exact, TRUE (1) = Approximate |
| Best Use Case | Product price lists, employee IDs, invoice tables | Monthly KPI summaries, tax slabs, horizontal calendars |
Syntax Breakdown: VLOOKUP and HLOOKUP Formula in Excel
1. VLOOKUP Formula Syntax
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Suppose cells D2:F6 contain a vertical product table where Column D is Product ID, Column E is Product Name, and Column F is Price. To fetch the price of the Product ID entered in cell A2, use:
=VLOOKUP(A2, $D$2:$F$6, 3, FALSE)
2. HLOOKUP Formula Syntax
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
If your manager sends a horizontal report in B1:E4 where Row 1 lists months (Jan, Feb, Mar, Apr), Row 2 lists Revenue, and Row 3 lists Expenses, pull Expenses for the month typed in A6 using:
=HLOOKUP(A6, $B$1:$E$4, 3, FALSE)
Common Mistakes That Cause #N/A Errors
- Forgetting
FALSE(Exact Match): Omitting the 4th argument tells Excel to use approximate match, which returns incorrect values on unsorted lists. - Trailing Spaces: Imported CSV text often has hidden spaces. Wrap lookup values with
TRIM(A2). - Unlocked Ranges: Always lock
table_arrayusing$signs before dragging your formula down.
Related Lookup Guides
Want to go deeper? Read our How to Use HLOOKUP in Excel (Horizontal Lookup) guide, learn MS Excel VLOOKUP, HLOOKUP & Pivot Tables, or revisit Mastering VLOOKUP and HLOOKUP Functions in Excel.
Frequently Asked Questions
What lookup function should be used to search for values in a specific row of a table and return values from adjacent rows?
HLOOKUP is the dedicated function for searching a specific top row horizontally and returning values from rows below it.
Can VLOOKUP search horizontally?
No. VLOOKUP only searches vertically down the first column of a range. For row-based headers, use HLOOKUP or XLOOKUP.
[…] with our tutorials on 10 Essential Excel Functions, VLOOKUP vs HLOOKUP, and Interactive KPI Dashboard […]