Formula Guide

The Excel HLOOKUP Function
explained simply

HLOOKUP searches across the top row of a table and pulls back a value from a row below the match. The horizontal counterpart to VLOOKUP.

ExcelPro · 5 min read · Updated June 2026
Contents
  1. What does HLOOKUP do?
  2. Syntax
  3. 5 examples
  4. HLOOKUP vs VLOOKUP
  5. Common mistakes
  6. FAQ

What does HLOOKUP do?

HLOOKUP (Horizontal Lookup) searches for a value across the top row of a table, then returns a value from a row a specified number of rows below that match.

Use it when your data is laid out with categories across columns (left to right) rather than down rows — for example, monthly figures running across the top of a sheet with metrics listed underneath each month.

Syntax

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
ArgumentDescription
lookup_value requiredThe value to search for in the top row of the table.
table_array requiredThe full table, including the row you are searching and the rows you might return from.
row_index_num requiredWhich row of the table to pull the result from. Row 1 is the top row itself; row 2 is one row down, and so on.
range_lookup optionalTRUE for approximate match (default), FALSE for exact match. Use FALSE almost always.
⚠️ row_index_num counts from the top of table_array, not the sheet

If table_array starts at row 5 of your sheet, row_index_num=2 still means "2 rows down from the top of the table" — i.e. sheet row 6, not sheet row 2.

Examples

Example 1
Look up a monthly figure
=HLOOKUP("Mar",A1:M3,3,FALSE)

Row 1 holds month names across columns, row 3 holds revenue. This returns March's revenue by matching "Mar" in row 1 and stepping down 2 rows.

Example 2
Exact match with FALSE
=HLOOKUP(B1,A1:F10,5,FALSE)

FALSE forces an exact match — if B1 isn't found in row 1 exactly, this returns #N/A rather than guessing.

Example 3
Approximate match for grade bands
=HLOOKUP(82,A1:F2,2,TRUE)

With TRUE, the top row must be sorted ascending. HLOOKUP finds the largest value <= 82 and returns the row below it — useful for tiered lookups like grade boundaries.

Example 4
Combine with MATCH for a dynamic row
=HLOOKUP(B1,A1:F10,MATCH("Revenue",A1:A10,0),FALSE)

MATCH finds which row "Revenue" is on, so the formula keeps working even if rows get reordered.

Example 5
Pulling a column header back
=HLOOKUP(120,A1:F2,1,TRUE)

row_index_num=1 just returns the lookup row itself — rarely useful on its own, but confirms what HLOOKUP matched against.

HLOOKUP vs VLOOKUP

Your data layoutUse
Categories run down column AVLOOKUP
Categories run across row 1HLOOKUP

Most real spreadsheets are organized with categories going down, which is why VLOOKUP (and now XLOOKUP) get used far more often than HLOOKUP. HLOOKUP mainly shows up in pivoted/transposed reports, like a 12-month forecast laid out with months across the top.

Common mistakes

⚠️ Forgetting FALSE for exact match

Without FALSE, HLOOKUP assumes your top row is sorted and may return a wrong, "close enough" match instead of an error.

⚠️ row_index_num is 1-based from the table, not the sheet

A row_index_num of 3 always means the 3rd row of table_array — recount if you resize the range.

⚠️ Mismatched table width

If table_array does not span every column you need, HLOOKUP cannot reach columns outside it.

FAQ

Can HLOOKUP look left?
No — like VLOOKUP, HLOOKUP can only return values from rows below the lookup row, never above. Use INDEX/MATCH or XLOOKUP if you need to look upward.
Is there a modern replacement for HLOOKUP?
XLOOKUP supports both horizontal and vertical lookups in one function and handles errors more gracefully — worth learning if your version of Excel has it.
Why does my HLOOKUP return #N/A?
Either the lookup_value genuinely is not in the top row, or you forgot FALSE and the approximate match logic could not find anything close enough.

Practise Excel with real data

ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.

Start practicing free →

Related formulas

VLOOKUP XLOOKUP INDEXMATCH LOOKUP