🟩 Sheet Formulas

HLOOKUP in Google Sheets

Use HLOOKUP when your data runs across rows instead of down columns — it searches the top row and returns a value from a row below.

=HLOOKUP("March", A1:M5, 3, FALSE)

Finds "March" in the top row of A1:M5 and returns the value 3 rows down in that column. FALSE forces an exact match.

How it works

HLOOKUP is the horizontal cousin of VLOOKUP. It searches for a key in the first row of a range, then returns the value from a row index you specify in that same column. The last argument controls matching: use FALSE for an exact match (almost always what you want) or TRUE for an approximate match on sorted data. Because it can only look downward from the top row, reach for XLOOKUP when you need more flexibility.

Variations

Approximate match on sorted headers

=HLOOKUP(A2, A1:M2, 2, TRUE)

TRUE finds the largest header not greater than A2 — the top row must be sorted.

Row index from a cell

=HLOOKUP(A2, $A$1:$M$5, B2, FALSE)

B2 decides which row to return, so one formula can pull different rows.

Modern replacement (XLOOKUP)

=XLOOKUP(A2, A1:M1, A3:M3)

XLOOKUP searches the header row and returns from any chosen row without counting.

Examples

ScenarioFormula
Get March's total from a monthly header row=HLOOKUP("March", A1:M5, 5, FALSE)
Pull a rate by grade code across columns=HLOOKUP(B2, $A$1:$Z$3, 3, FALSE)

FAQ

What is the difference between HLOOKUP and VLOOKUP?

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 #N/A?

The key was not found in the top row, often due to a spelling difference or extra space. Use exact match (FALSE) and wrap the key in TRIM.

Should I still use HLOOKUP?

It works fine, but XLOOKUP is more flexible and does not need a hard-coded row number, so prefer it for new sheets.

Related formulas