HLOOKUP is an Excel function to lookup and retrieve data from a specific row in table. The "H" in HLOOKUP stands for "horizontal", where lookup values appear in the first row of the table, moving horizontally to the right. HLOOKUP supports approximate and exact matching, and wildcards (* ?) for finding partial matches.
Look up a value in a table by matching on the first row
row_index - The row number from which to retrieve data.
range_lookup - [optional] A boolean to indicate exact match or approximate match. Default = TRUE = approximate match.
HLOOKUP searches for a value in the first row of a table. At the match column, it retrieves a value from the specified row. Use HLOOKUP when lookup values are located in the first row of a table. Use VLOOKUP when lookup values are located in the first column of a table.
Range_lookup controls whether value needs to match exactly or not. The default is TRUE = allow non-exact match.
Set range_lookup to FALSE to require an exact match.
If range_lookup is TRUE (the default setting), a non-exact match will cause the HLOOKUP function to match the nearest value in the table that is still less than value.
When range_lookup is omitted, the HLOOKUP function will allow a non-exact match, but it will use an exact match if one exists.
If range_lookup is TRUE (the default setting) make sure that lookup values in the first row of the table are sorted in ascending order. Otherwise, HLOOKUP may return an incorrect or unexpected value.
If range_lookup is FALSE (require exact match), values in the first row of table do not need to be sorted.
To lookup and retrieve the first text value across a range of columns, you can use the HLOOKUP function with a wildcard. In the example shown, the formula in F5 is:
How this formula...
Learn Excel formulas and functions with concise, clear videos. Master absolute/relative addresses, dates, text, named ranges, and tools for troubleshooting. Each video comes with a practice worksheet and audio transcript. Instant access and complete 100% guarantee. Start today!