What it does
HLOOKUP searches across the first row of a table and returns a value from a lower row.
Syntax or pattern
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])5 practical examples
Find a value by month header
Look across month names and return a sales value.
=HLOOKUP(B1, $B$1:$M$5, 3, FALSE)This works when months are arranged horizontally.
Return a target by quarter
Find the target for the selected quarter.
=HLOOKUP(A2, Targets, 2, FALSE)Useful for compact planning sheets.
Use HLOOKUP with IFERROR
Hide errors when the header is missing.
=IFERROR(HLOOKUP(B1, $B$1:$M$5, 3, FALSE), "Missing month")A friendly message makes the sheet easier to understand.
Approximate horizontal lookup
Find a grade or band from horizontal breakpoints.
=HLOOKUP(A2, GradeTable, 2, TRUE)Approximate mode needs sorted breakpoints.
Return a cost by product header
Look up a product across columns and return the cost row.
=HLOOKUP(D2, ProductMatrix, 4, FALSE)Best for small horizontal matrices.
Common mistakes to avoid
- Using HLOOKUP when the table should be vertical.
- Forgetting that the lookup row must be the top row.
- Using approximate matching accidentally.
Related Excel examples
FAQ
Is HLOOKUP still useful?
Sometimes, but XLOOKUP often replaces it in modern workbooks.