Excel functions / Lookup & reference

HLOOKUP

Finds a value in the top row of a table and returns a value from a row below it.

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

Arguments

lookup_valueWhat you are searching for in the top row.
table_arrayThe table to search. HLOOKUP looks across its first row.
row_index_numWhich row to return, counting the top row as 1.
range_lookupFALSE for an exact match.

How it works

HLOOKUP is VLOOKUP turned on its side. The H stands for horizontal: it searches across the top row, then counts down to the row you ask for.

Use it when your headings run along the top and you want a value from beneath one of them, such as a month in a monthly report.

Example

F2=HLOOKUP("Stock",A1:D5,3,FALSE)
ABCDEF
1CodeProductPriceStock
2A10Lamp$25.00123
3B20Desk$140.003
4C30Chair$85.007
5D40Shelf$60.000
6

Result: 3. Finds the Stock heading and returns the value 3 rows down: the stock for Desk.

Tips

Practise HLOOKUP

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related