HLOOKUP stands for "Horizontal Lookup." It works the same way as VLOOKUP, but it searches across the first row of a table and returns a value from a row below.
HLOOKUP Syntax
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
- lookup_value: The value you want to search for
- table_array: The range of cells that contains the data
- row_index_num: The row number from which to return a value
- range_lookup: FALSE for exact match, TRUE for approximate match
Worked Example: Looking Up Product Prices
Imagine you have a price list that runs horizontally:
| A | B | C | D | E |
|---|
| 1 | Item | Rice | Sorghum | Dura |
| 2 | Price (SSP) | 2500 | 1800 | 1200 |
| 3 | Stock (kg) | 500 | 300 | 450 |
To find the price of Sorghum, you would write:
=HLOOKUP("Sorghum", A1:E3, 2, FALSE)
This formula searches for "Sorghum" in row 1, finds it in column C, then returns the value from row 2 (the Price row), which is 1800 SSP.