Learn VLOOKUP and HLOOKUP in Excel

The same idea, applied to two different data layouts

VLOOKUP and HLOOKUP solve the exact same problem - matching a value and returning data from a related row or column - but they're built for two different data layouts. VLOOKUP searches down a column, while HLOOKUP searches across a row.

This page covers both with worked examples, so it's clear which one fits a given spreadsheet's layout before writing either formula.

Turbo Excel VLookup

Turbo Excel VLookup
App Screenshots
Lookup and Merge tab - VLOOKUP XLOOKUP replacement
Match mode and return option selection
Lookup statistics and match percentage report
Join tab - Left Right Inner Full Outer Anti Semi Cross join
Duplicates tab - duplicate record finder
Data Cleaning tab - trim normalize and clean columns
Formula Generator tab - VLOOKUP XLOOKUP INDEX MATCH formula builder
Reports tab - session log of lookups joins and exports
Export options - XLSX CSV TSV output settings
Key Column Pairs - multi-key composite matching setup
License activation screen - Gumroad key entry
Help tab - built-in usage guide and tips
Enlarged application screenshot
How to Tell Which One You Need

If your data is organized with categories running down the left side and records listed in rows underneath, use VLOOKUP. If your data instead has categories running across the top row, with values listed underneath each one, use HLOOKUP - it's purely a question of layout, not which is "better."

A VLOOKUP Example (Data Runs Down)
Employee IDNameDepartmentSalary
E101Asha RaoMarketing54000
E102Vikram ShahFinance61000
E103Priya NairSales48000
=VLOOKUP("E102", A2:D4, 3, FALSE) // returns "Finance"
A HLOOKUP Example (Data Runs Across)

Here quarterly figures run across the top row instead of down a column:

MetricQ1Q2Q3
Revenue210000245000238000
Expenses150000162000158000
=HLOOKUP("Q2", B1:D3, 2, FALSE) // returns 245000, the Q2 Revenue figure

The third argument, row_index_num, counts rows downward instead of columns across - row 2 here is the Revenue row.

Why HLOOKUP Is Used Less Often

Most real-world spreadsheets are organized with records running down rows rather than across columns, which is why VLOOKUP tends to come up far more often in practice. HLOOKUP is mainly useful for summary tables, dashboards, or data that was exported in a transposed layout.

Matching Either Layout Without Formulas

Turbo Excel VLookup is built around the more common column-based layout that VLOOKUP handles, matching an entire dataset at once through its dropdown interface rather than requiring either formula to be written manually.

Speeding Up VLOOKUP in a Large Workbook

A worksheet with thousands of VLOOKUP formulas recalculating against a large table_array can slow Excel down noticeably, especially if the range isn't locked and Excel has to re-evaluate a shifting reference on every keystroke.

Converting the source range into an Excel Table (Insert > Table) before referencing it in VLOOKUP tends to help, since Table references automatically resize with the data and stay consistent without needing manual $ locking.

Building the Habit of Testing With One Row First

Before applying a new VLOOKUP formula to an entire column, it's worth testing it on a single row and manually verifying the result against the source data, since a mistake caught in one cell takes seconds to fix, while the same mistake copied down five hundred rows takes much longer to untangle.

This is especially worth doing whenever the source table_array has changed shape recently, since a resized or reordered table is the single most common reason a previously reliable formula starts returning unexpected results.

Frequently Asked Questions

What's the core difference between VLOOKUP and HLOOKUP?

VLOOKUP searches down a column for a match; HLOOKUP searches across a row for a match.

How do I know which one my spreadsheet needs?

Check whether your categories run down the left column (VLOOKUP) or across the top row (HLOOKUP).

What does row_index_num mean in HLOOKUP?

It counts rows downward from the top of the selected range, similar to how col_index_num counts columns in VLOOKUP.

Is HLOOKUP as commonly used as VLOOKUP?

No, most spreadsheets are organized with data running down rows, so VLOOKUP comes up far more often in practice.

Can the same table use both VLOOKUP and HLOOKUP?

Yes, if a table has both row and column headers, either formula can search along the relevant axis.

Does XLOOKUP replace the need to choose between them?

Largely yes, since XLOOKUP can search either direction by selecting the appropriate lookup_array and return_array.

Can trailing spaces in a cell cause a lookup to fail?

Yes, an extra space at the end of a value is invisible but prevents an exact match; TRIM() around the lookup value often fixes this.

Does the order of rows in the source data matter for an exact match?

No, an exact match search works regardless of row order; only an approximate match requires sorted data.

Is it safe to have duplicate values in the lookup column?

A lookup formula will only return the first matching row it finds, so duplicates can silently return the wrong record if not accounted for.

Should I test a new formula on one row before applying it everywhere?

Yes, verifying a single result against the source data first catches setup mistakes before they're copied across an entire column.

Ready to stop fighting #N/A errors and match your spreadsheets visually?

Related guides and tools

This guide is part of TurboSoft’s Excel lookup and matching resources. Turbo Excel Lookup handles all of these tasks offline on Windows.

Get Turbo Excel Lookup →