HLookup in Excel

The HLOOKUP formula in Excel is used to perform horizontal lookups in a worksheet. It works similarly to the VLOOKUP formula but searches for values in a row instead of a column. The HLOOKUP formula returns a value from a specified row based on a search value that you specify.

The syntax for the HLOOKUP formula is:

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

Here's an explanation of each parameter:

search_value: The value that you want to search for. This can be a cell reference, a constant, or a formula.

table_array: The range of cells where you want to perform the lookup. The first row of the table_array is used as the header row, and the search_value is compared against the values in the header row.

row_index: The row number in the table_array that you want to return values from.

range_lookup (optional): A logical value that specifies whether the search_value should be matched exactly or approximately. If the range_lookup argument is set to TRUE or omitted, an approximate match is performed. If the range_lookup argument is set to FALSE, an exact match is performed.

For example, if you have a worksheet with a table of product prices, and you want to look up the price of a product named "Apple" in row 2, you could use the following formula:

=HLOOKUP("Apple", A1:D4, 2, TRUE)

This would return the value from row 2 in the table that corresponds to the "Apple" value in the header row. If the "Apple" value is not found, an error will be returned.

Previous

VLookup in Excel Multiple Sheets

Next

Index Match vs VLookup