HLOOKUP Function in Excel: Complete Tutorial with Examples

HLOOKUP searches horizontally across rows instead of down columns. Perfect for time-series data and tables organized by dates or periods.

Need to search horizontally across rows instead of down columns? HLOOKUP finds a value in the top row and returns data from any row below it. It’s VLOOKUP’s horizontal cousin.

To download the exercise file for this function, click here.

What Makes HLOOKUP Useful

HLOOKUP works when your data is organized in rows:

  • Horizontal lookups – Search across columns instead of down rows
  • Time-series data – Perfect for data organized by dates or periods across columns
  • Comparison tables – Great for product specs or features laid out horizontally
  • Dashboard summaries – Pull specific metrics from row-based reports
  • Cross-tabulated data – Handle tables where categories run horizontally
The Syntax
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

The lookup_value is what you’re searching for in the top row. Table_array is your data range. Row_index_num tells Excel which row to return.


Example 1: Basic Quarterly Sales Lookup

Find Q3 sales:

Formula: =HLOOKUP("Q3", A1:E2, 2, FALSE)

Result: $145K

Excel searches row 1 for “Q3”, then returns the value from row 2. FALSE means exact match only.


Example 2: Product Specifications

Look up the weight of Product B:

Formula: =HLOOKUP("Product B", A1:D4, 3, FALSE)

Result: 3.2 lbs

Excel searches row 1 for “Product B”, then returns the value from row 3. FALSE means exact match only. Even with the selection being 4 rows (A1:D4), HLOOKUP returns the value from row 3.


Example 3: Monthly Data with Cell Reference

Look up the value for the month entered in cell F1:

Formula: =HLOOKUP(F1, A1:E3, 2, FALSE)

Result: Returns revenue for whatever month is in F1

Change F1 from “Jan” to “Apr” and the result updates automatically.


Example 4: Price Tier Lookup

Find the shipping cost for 15 items:

Formula: =HLOOKUP(15, A1:E2, 2, TRUE)

Result: $8.99

TRUE finds the closest match without going over. 15 items falls into the “10” tier, so you get that shipping rate.


Example 5: Year-over-Year Comparison

Look up 2024 sales from a multi-year table:

Formula: =HLOOKUP(2024, A1:E4, 3, FALSE)

Result: $644K

Returns the profit row (row 3) for year 2024.


Example 6: Grade Scale Lookup

Find the letter grade for a score of 87:

Formula: =HLOOKUP(87, A1:E2, 2, TRUE)

Result: C

87 falls between 80 and 90, so it returns the grade for 80 (which is C). The top row must be sorted ascending for this to work correctly.


Range Lookup Options
Common Row Index Numbers

If your table has 4 rows and you want:

  • Row 1: Use 1 (the header row)
  • Row 2: Use 2
  • Row 3: Use 3
  • Row 4: Use 4

Count from the first row of your table_array, not from row 1 of the spreadsheet.

Important Notes
  • HLOOKUP only searches the first row of your range
  • It can’t look upward (only returns rows below the search row)
  • The first row must be sorted for approximate matches
  • Row index must be a positive number
  • Use VLOOKUP if your data runs vertically, HLOOKUP if it runs horizontally
Start Using It

Find a table in your spreadsheet where data runs horizontally. Try looking up a column header. Write an HLOOKUP formula. Start with FALSE for exact matches, then try TRUE for ranges.

HLOOKUP clicks once you understand when your data layout needs it.


Questions about HLOOKUP? Need help deciding between VLOOKUP and HLOOKUP? Let’s connect.