Cellwise

Lookup function

Excel HLOOKUP function

HLOOKUP searches across the top row of a table for a value, then returns something from the same column in a row you choose. It is the sideways version of VLOOKUP, for tables laid out with headers along the top.

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

Arguments

lookup_value
The value to find in the first row, like a month.
table_array
The table to search. The lookup value must be in its top row.
row_index_num
Which row of the table to return, counting from 1.
range_lookup
FALSE for an exact match. Leave it out and Excel uses an approximate match.

HLOOKUP examples

Every result below was calculated live from this sample sheet.

ABCDE
1MetricJanFebMarApr
2Revenue42000395004780051200
3Expenses31000298003340035100
4New clients64911
  1. fx=HLOOKUP("Mar",B1:E4,2,FALSE)

    Result: 47800

    Finds Mar in the top row and returns revenue from row 2: 47800.

  2. fx=HLOOKUP("Feb",B1:E4,4,FALSE)

    Result: 4

    Row 4 of the table gives February's new clients: 4.

  3. fx=HLOOKUP("May",B1:E4,2,FALSE)

    Result: #N/A

    May is not in the table, so HLOOKUP returns #N/A.

  4. fx=HLOOKUP("Apr",B1:E4,2,FALSE)-HLOOKUP("Apr",B1:E4,3,FALSE)

    Result: 16100

    Two lookups give April profit: revenue minus expenses.

How to use HLOOKUP

  1. Click the cell for the answer.
  2. Type =HLOOKUP( and the value to find.
  3. Select the table, starting with the row of headers.
  4. Type the row number to return, then FALSE for an exact match.

Common HLOOKUP mistakes

Leaving out FALSE

Without it, Excel does an approximate match on the top row and can return the wrong column.

Counting rows from the sheet, not the table

row_index_num counts from the first row of table_array. If the table starts at row 1, row 2 is index 2.

Looking up a row above

HLOOKUP only returns rows below the lookup row. Use XLOOKUP or INDEX with MATCH for anything else.

HLOOKUP FAQ

What is the difference between VLOOKUP and HLOOKUP?

VLOOKUP searches down the first column and returns from a column to the right. HLOOKUP searches across the first row and returns from a row below.

Why does HLOOKUP return the wrong value?

Usually range_lookup is missing, so Excel does an approximate match. Add FALSE as the last argument.

Is HLOOKUP still used?

It still works in all versions, but XLOOKUP handles both horizontal and vertical lookups and is easier to maintain.

Guides that use HLOOKUP

Related functions

Updated 2026-10-31