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.

Advertisement
Formula
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

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 XLOOKUP function 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: The lookup_value MUST be in the top row of this range!
  • row_index_num: The row number in the table_array to return the value from. (e.g., 1 = top row, 2 = second row, etc.).
  • [range_lookup] (optional):
    • TRUE or 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 →NorthSouthEastWest
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.

Advertisement

💡 Quick Tips for HLOOKUP

  1. Top Row Only: Unlike VLOOKUP, HLOOKUP always searches in the first row of your table_array!
  2. Exact vs Approximate:
    • For text and codes, always use FALSE for exact match!
    • Use TRUE only when your first row is sorted numerically or alphabetically.
  3. Row Numbers Don't Count: The row_index_num refers to the position within the table_array you selected, not the worksheet row numbers!
  4. #N/A Error: If HLOOKUP can't find the lookup_value (using exact match), it returns #N/A. You can wrap it in IFERROR() to show a custom message like IFERROR(HLOOKUP(...), "Not Found").
  5. Range Too Small: If row_index_num is larger than the number of rows in table_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

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement