How to Use HLOOKUP Function in Excel + Tips (Video in Khmer)
Learn how to use HLOOKUP function in Excel step-by-step to search values horizontally (rows) with simple examples, tips, and video tutorial in Khmer.
Hello everyone! In this video I show you the easy step-by-step guide on how to use HLOOKUP function in Microsoft Excel. Follow this video to learn.
HLOOKUP function is a lookup formula that search for a value in the top row of a table and return a value in the same column from a different row (searches horizontally).
💡 Pro Tip: Since Excel 2019, you can use the more powerful
XLOOKUPfunction which can search vertically OR horizontally and has more features! Learn more here: How to Use XLOOKUP Function in Excel
🛠️ Formula Syntax
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
lookup_value: The value you want to search for (can be text, number, or cell reference).table_array: The table range where you want to search. IMPORTANT: Thelookup_valueMUST be in the top row of this range!row_index_num: The row number in thetable_arrayto return the value from. (e.g.,1= top row,2= second row, etc.).[range_lookup](optional):TRUEor omitted: Approximate match (table must be sorted by first row).FALSE: Exact match (recommended for most cases).
📋 Sample Data
Imagine you have this monthly sales data in cells A1:E4:
| Region → | North | South | East | West |
|---|---|---|---|---|
| Sales | $1,200 | $1,500 | $900 | $1,100 |
| Bonus | $120 | $150 | $90 | $110 |
Let's break down how to use HLOOKUP with this data!
📊 Simple Examples
Example 1: Get "South" Region Sales (Exact Match)
Suppose Cell A6 = "South":
=HLOOKUP(A6, A1:E2, 2, FALSE)
👉 Explanation:
- Look for
"South"in the top row (A1:E1) - Return value from row 2 (Sales row) in the same column
FALSE= exact match
👉 Result: $1,500
Example 2: Get "North" Region Bonus (Exact Match)
Use cell A7 = "North":
=HLOOKUP(A7, A1:E3, 3, FALSE)
👉 Explanation:
- Look for
"North"in the top row - Return value from row 3 (Bonus row)
👉 Result: $120
Example 3: Get Total Sales (Approximate Match)
Suppose you want sales amount for a region name in cell A8:
=HLOOKUP(A8, A1:E2, 2, TRUE)
Note: This works if your table is sorted by the first row! If the exact name isn't found, it returns the closest value that is less than or equal to the lookup value.
💡 Quick Tips for HLOOKUP
- Top Row Only: Unlike
VLOOKUP,HLOOKUPalways searches in the first row of yourtable_array! - Exact vs Approximate:
- For text and codes, always use
FALSEfor exact match! - Use
TRUEonly when your first row is sorted numerically or alphabetically.
- For text and codes, always use
- Row Numbers Don't Count: The
row_index_numrefers to the position within thetable_arrayyou selected, not the worksheet row numbers! - #N/A Error: If
HLOOKUPcan't find thelookup_value(using exact match), it returns#N/A. You can wrap it inIFERROR()to show a custom message likeIFERROR(HLOOKUP(...), "Not Found"). - Range Too Small: If
row_index_numis larger than the number of rows intable_array, you'll get#REF!error.
🎥 Video Tutorial (Khmer)
Watch this video to see step-by-step examples of how to use HLOOKUP function in Excel:
📚 Related Resources
Related Tutorials
Opens in new tab ↗How to Use REDUCE Function in Excel + Tips
Learn how to use REDUCE function in Excel step-by-step to swap or insert text based on position with simple examples.
How to Use MIN, MINA, MINIFS, and DMIN Functions in Excel + Tips
Learn how to use MIN, MINA, MINIFS, and DMIN functions in Excel step-by-step with simple examples, tips, and video tutorials in Khmer.
How to Use FLOOR, FLOOR.MATH, FLOOR.PRECISE Function in Excel + Tips
Learn how to use FLOOR, FLOOR.MATH, and FLOOR.PRECISE functions in Excel step-by-step to round numbers down to nearest multiple with simple examples, tips, and video tutorial in Khmer.