HLOOKUP
๐ Excel Guide: How to Use HLOOKUP
Function
๐ What is HLOOKUP?
HLOOKUP (Horizontal Lookup) is used to search for a value in the first row of a table and return a value from a specified row in the same column.
✅ Purpose:
To look horizontally across rows and return data based on a match found in the first row.
๐ Syntax:
๐งฉ Parameters:
Argument | Description |
---|---|
lookup_value | The value to search for in the first row of the table. |
table_array | The range of cells that contains the data. |
row_index_num | The row number in the table_array from which to return the value. |
range_lookup | Optional: TRUE for approximate match (default), FALSE for exact match. |
๐งพ Example:
๐️ Data Table (Range A1:D2):
A | B | C | D | |
---|---|---|---|---|
Item | Apple | Banana | Orange | Mango |
Price | 100 | 60 | 80 | 90 |
๐ฏ Goal:
Find the price of "Orange" using HLOOKUP
.
✅ Formula:=HLOOKUP("Orange", A1:D2, 2, FALSE)
๐ค Result: 80
๐ช Step-by-Step Instructions:
Step 1: Understand Your Table
-
Make sure your data is structured horizontally, with lookup values in the first row.
-
Ensure the
row_index_num
corresponds to the row below the first row.
Step 2: Enter the HLOOKUP Formula
-
Type
=HLOOKUP(
-
Enter the lookup value in quotes or a reference cell (e.g.,
"Orange"
). -
Specify the table_array, like
A1:D2
. -
Set the row_index_num to indicate which row's data you want (e.g.,
2
for the second row). -
Choose
FALSE
for an exact match orTRUE
for an approximate match.
Step 3: Press Enter
-
The formula will return the corresponding value from the row you specified.
⚠️ Notes & Tips
-
HLOOKUP
only looks left to right (first row downwards). -
For vertical data lookups, use
VLOOKUP
. -
HLOOKUP
is case-insensitive. -
If using approximate match (
TRUE
), the first row must be sorted in ascending order.