Lookup function

HLOOKUP

Look a value up along the first row of a block.

Purpose

Read a value off a table laid out in rows rather than columns

Returns

The value in the row you asked for, from the column that matched

Syntax

=HLOOKUP(lookup_value, table, row_number, [exact_match])

ArgumentRequiredWhat goes here
lookup_valueRequiredThe value to find.
tableRequiredThe block to search. Its first row is the one searched.
row_numberRequiredWhich row of that block to read back, counting the first as 1.
exact_matchOptionalFALSE for an exact match.

How to use HLOOKUP

HLOOKUP is VLOOKUP turned on its side. It searches the first row of a block and reads down to the row number you name.

It exists because some reports are laid out with periods along the top rather than down the side, which is common in a budget.

Everything true of VLOOKUP is true here: exact matching needs FALSE, the row number counts inside the block, and inserting a row breaks it silently.

In practice it turns up far less often than VLOOKUP, and mostly as the wrong answer beside it in a list of choices. If the data really is horizontal, XLOOKUP handles both directions without a separate function.

Examples

Every result below is worked out by the same evaluator that marks your answers, on the sheet shown here.

Payables ageing — October.xlsxSheet1
Harbour Foods payables at 31 October 2026, with supplier terms alongside
ABCDEFGH
1InvoiceSupplierStatusDays overdueAmountSupplierTerms (days)
2INV-8801Brightwell PaperOverdue12940Ashgrove Catering30
3INV-8802Calder UtilitiesQueried471180Brightwell Paper30
4INV-8803Meridian FreightOverdue632450Calder Utilities14
5INV-8804Ashgrove CateringOn terms0405Meridian Freight45
6INV-8805Brightwell PaperOverdue38760Thornbury Print60
7INV-8806Thornbury PrintOverdue911320
8INV-8807Meridian FreightOn terms0580
9INV-8808Calder UtilitiesOverdue24215
FormulaResult
=HLOOKUP("Amount",A1:E9,4,FALSE)Find the Amount heading along row 1, then read down to the fourth row of the block.2450
=HLOOKUP("Days overdue",A1:E9,4,FALSE)The same row, a different column, by changing only what is being searched for.63
=HLOOKUP("Status",A1:E9,2,FALSE)Row 2 of the block is the first row of data.Overdue

Notes

  • The row number counts from the top of the block, so the heading row is row 1 and the first data row is row 2.
  • XLOOKUP searches a row or a column with the same arguments, which is why HLOOKUP is rarely the right choice in a current version of Excel.