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.
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.
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])| Argument | Description |
|---|---|
| lookup_value required | The value to search for in the top row of the table. |
| table_array required | The full table, including the row you are searching and the rows you might return from. |
| row_index_num required | Which 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 optional | TRUE for approximate match (default), FALSE for exact match. Use FALSE almost always. |
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.
=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.
=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.
=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.
=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.
=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.
| Your data layout | Use |
|---|---|
| Categories run down column A | VLOOKUP |
| Categories run across row 1 | HLOOKUP |
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.
Without FALSE, HLOOKUP assumes your top row is sorted and may return a wrong, "close enough" match instead of an error.
A row_index_num of 3 always means the 3rd row of table_array — recount if you resize the range.
If table_array does not span every column you need, HLOOKUP cannot reach columns outside it.
ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.
Start practicing free →