HLOOKUP
Searches for a value in the first row of a table and returns a value in the same column from a row you specify.
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])Arguments
lookup_valueThe value to search for in the first rowtable_arrayThe table range containing the datarow_index_numThe row number to return the value fromrange_lookupTRUE for approximate match, FALSE for exact match(optional)
=HLOOKUP("Q1",A1:E5,3,FALSE)Finds 'Q1' in row 1 and returns value from row 3
=HLOOKUP(2023,A1:Z10,5,FALSE)Looks up year 2023 and returns row 5 data
=HLOOKUP("Sales",Data,2,FALSE)Finds 'Sales' header and returns row 2
- •HLOOKUP works best when your data is organized in rows, not columns
- •Less common than VLOOKUP as most data is organized vertically
- •Consider transposing your data or using INDEX/MATCH instead
- •Leaving range_lookup blank or set to TRUE, which returns the closest match instead of an exact one, with no warning that it wasn't exact
- •Forgetting HLOOKUP searches horizontally across the top row, so it can only return values from rows below the one it searches, never above
- •Copying the formula across columns with a relative table_array reference, which shifts the search table for each copy instead of keeping it fixed
What's the difference between HLOOKUP and VLOOKUP?
HLOOKUP searches across the top row of a table and pulls a value down from a specified row number. VLOOKUP searches down the first column and pulls a value from a specified column number.
Can HLOOKUP return a value from a row above the one it searches?
No, just like VLOOKUP can only look right, HLOOKUP can only look down from the row it searches - it can't pull from rows above the header row.
Should I use HLOOKUP or XLOOKUP for a horizontal search?
XLOOKUP if it's available in your Excel version - it handles both directions, defaults to exact match, and doesn't break when columns are inserted.
Need to translate a formula using HLOOKUP?
Use our translator to convert your complete formula
