SheetRocks
Documentation/Formulas/HLOOKUP

HLOOKUP

Returns the corresponding value from the specified row of table which matches exactly or approximately to the first row of the table.

Syntax

HLOOKUP(lookup_value, table_array, row_index, [range_lookup])

Arguments

Argument Description Required
lookup_value The value to search for in the first row of table_array. Required
table_array The array from which to retrieve a value. Required
row_index The row number from which to retrieve a value. Required
range_lookup Whether to perform exact match (false) or approximate match (true). Defaults to true. Optional

Examples

Find product price by name

=HLOOKUP("Bananas", A1:C2, 2, false)
Result ⇒ 1.80
A B C
1 Apples Bananas Cherries
2 2.50 1.80 4.20

Lookup with approximate match

=HLOOKUP(7, A1:D2, 2, true)
Result ⇒ B
A B C D
1 1 5 10 20
2 A B C D

Find category by score

=HLOOKUP(75, A1:E2, 2, true)
Result ⇒ C
A B C D E
1 Score 60 70 80 90
2 Grade D C B A

Related Functions

Other Data functions:


← Back to Formula Reference