How to use HLOOKUP horizontal lookup formula in Excel - ExcelXYZ

How to Use HLOOKUP in Excel (Horizontal VLOOKUP Formula & Examples)

Many Excel users search for “horizontal VLOOKUP” when their data runs across columns instead of down rows. In Microsoft Excel, the built-in function for horizontal row lookups is HLOOKUP.

Whether you are pulling monthly sales figures from a financial calendar, reading commission slabs arranged horizontally, or preparing for an Excel skills test, this guide shows you exactly how HLOOKUP works.

What Is HLOOKUP in Excel?

HLOOKUP stands for Horizontal Lookup. It searches for a lookup value across the top row of a selected table array and returns the value from the same column in a row number you specify.

HLOOKUP Formula Syntax

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
  • lookup_value: The column header you want to match in Row 1 of your table (e.g., "Mar" or cell A6).
  • table_array: The entire horizontal range (e.g., $B$1:$E$4).
  • row_index_num: Which row to return from (1 = top row, 2 = second row, 3 = third row).
  • range_lookup: Use FALSE (or 0) for an exact match, or TRUE (or 1) for an approximate match on sorted ranges.

Step-by-Step HLOOKUP Example

Imagine a monthly summary sheet in range B1:E4:

Row B (Metric) C (Jan) D (Feb) E (Mar)
1 Metric Jan Feb Mar
2 Revenue $4,200 $5,100 $6,400
3 Expenses $1,800 $2,050 $2,300
4 Net Profit $2,400 $3,050 $4,100

To look up Expenses (Row 3) for Mar, type:

=HLOOKUP("Mar", $B$1:$E$4, 3, FALSE)

Excel matches "Mar" in Row 1 (Column E) and returns $2,300 from Row 3.

Dynamic Tip: Match Row Automatically With MATCH()

Instead of hardcoding row 3, combine HLOOKUP with MATCH so users can pick both the Month and Metric from dropdowns:

=HLOOKUP(B7, $B$1:$E$4, MATCH(A7, $B$1:$B$4, 0), FALSE)

How to Avoid HLOOKUP #N/A and #REF! Errors

  • Use IFERROR for clean dashboards: =IFERROR(HLOOKUP("Apr", $B$1:$E$4, 3, FALSE), "No Data")
  • Check row_index_num: If your table has 4 rows and you enter 5, Excel returns #REF!.
  • Watch out for extra spaces: Hidden spaces in headers like "Mar " cause #N/A.

Explore More Excel Tutorials

Compare both lookup functions in Difference Between VLOOKUP and HLOOKUP in Excel, or see how lookups connect to Pivot reporting in MS Excel VLOOKUP, HLOOKUP & Pivot Table Guide. Need custom reporting templates? Check our Multi-Currency Excel & Google Sheets Tracker.

Frequently Asked Questions

Is there a horizontal VLOOKUP in Excel?

Yes—HLOOKUP is Excel’s horizontal equivalent of VLOOKUP. In Excel 365 and 2021+, XLOOKUP also performs both vertical and horizontal lookups.

Does HLOOKUP work with approximate matches like tax brackets?

Yes. Sort the top row in ascending order from left to right and set the 4th argument to TRUE (or 1).

Leave a Reply