Searching Across Rows With HLOOKUP
Look up values along a row instead of down a column.
Meet HLOOKUP
HLOOKUP is the horizontal twin of VLOOKUP. The H stands for Horizontal: instead of searching down a column, it searches across the top row of a table, then returns a value from further down the same column.
Use HLOOKUP when your data is laid out sideways, with labels along a row instead of down a column.
=HLOOKUP(value, table, row_index_num, [range_lookup])The Four Arguments
HLOOKUP mirrors VLOOKUP, with one key change. Its arguments are:
- lookup_value - what you search for in the top row
- table_array - the range of cells
- row_index_num - which row to return from (counted from the top)
- [range_lookup] - TRUE for approximate, FALSE for exact
Notice the third argument is now a row index, not a column index, because the data runs down.
=HLOOKUP(lookup_value, table_array, row_index_num, FALSE)All lessons in this course
- How VLOOKUP Searches a Table
- Exact vs Approximate Match
- Searching Across Rows With HLOOKUP
- Why VLOOKUP Sometimes Fails