The HLOOKUP function
Looks for a value in the first row of a table and returns the value from another row in the same column.
Syntax
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])- lookup_value
- The value to find in the first row.
- table_array
- The table, starting with the row to search.
- row_index_num
- Which row of the table to return, counting from 1.
- range_lookup (optional)
- FALSE for an exact match; TRUE or left out for the closest smaller value.
Examples
F1
=HLOOKUP(1"Feb",2B1:D2,32,4FALSE)| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Month | Jan | Feb | Mar | 150 | |
| 2 | Sales | 120 | 150 | 90 |
In plain words: Find 1Feb in the top row of 2B1:D2 and return the value 3in the table's second row, 4only on an exact match.
F1=HLOOKUP("Mar",A1:D2,2,FALSE)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Month | Jan | Feb | Mar | 90 | |
| 2 | Sales | 120 | 150 | 90 |