SheetsLessons
Lookup function

HLOOKUP function in Google Sheets

HLOOKUP is VLOOKUP turned sideways. It searches across the first row of a table and returns a value from further down the same column. Use it when headings run left to right, like months in a report.

Syntax

=HLOOKUP(search_key, range, index, [is_sorted])
search_key
The value to find in the first row.
range
The table to search.
index
Which row of the range to return. The header row is 1.
is_sorted
Optional. FALSE for exact match. Defaults to TRUE.

Practice HLOOKUP

Task 1 of 2

Using HLOOKUP, return March costs from the monthly report. Answer in I2.

I2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

HLOOKUP examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCDE
1MetricJanFebMarApr
2Revenue$4,200.00$3,900.00$5,100.00$4,800.00
3Costs$3,100.00$2,800.00$3,500.00$3,300.00
Monthly report (months run across the top)
FormulaResultWhat it shows
=HLOOKUP("Mar", B1:E3, 2, FALSE)$5,100.00March revenue.
=HLOOKUP("Mar", B1:E3, 3, FALSE)$3,500.00March costs.
=HLOOKUP("Feb", B1:E3, 2, FALSE) - HLOOKUP("Feb", B1:E3, 3, FALSE)$1,100.00February profit.

Tips and common mistakes

  • Like VLOOKUP, is_sorted defaults to TRUE. Add FALSE for exact matches.
  • XLOOKUP handles horizontal lookups too, without counting rows.

Related functions