When your data runs across instead of down — months in a header row, categories along the top — HLOOKUP searches the first row and returns a value from a row below. It’s VLOOKUP turned on its side.
FALSE forces an exact match.
The example
Months across the top; look up Mar and return its Sales row.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Metric | Jan | Feb | Mar |
| 2 | Units | 100 | 140 | 120 |
| 3 | Sales | $1,000 | $1,400 | $1,200 |
The formula
March sales (row 3 of the table):
How it works
HLOOKUP works like VLOOKUP but sideways:
- It searches the first row of the table (
A1:D3) for the lookup value — “Mar.” - The row index
3says “return the value from the 3rd row of the table” in that column — the Sales figure. FALSErequires an exact header match (useTRUEonly for sorted numeric breakpoints).- The result is the cell where the Mar column meets the Sales row —
$1,200.
XLOOKUP replaces both. =XLOOKUP(E2, A1:D1, A3:D3) does a horizontal lookup without a row-index number, and the same function handles vertical lookups too — one function for every direction.
Try it: interactive demo
Pick a month and which row to return.
Variations
XLOOKUP horizontal
No row number needed:
Two-way (row and column)
HLOOKUP with a MATCH for the row:
Approximate (sorted breakpoints)
For a horizontal rate band:
Pitfalls & errors
#N/A. The header isn’t found exactly — usually a trailing space or different text. Confirm with =E2=C1 and TRIM if needed.
Row index is 1-based within the table. Row 1 is the header row itself; the first data row is index 2. Count from the top of the table range, not the sheet.
HLOOKUP only looks down from the header row. Like VLOOKUP, it can’t return a value above the search row — XLOOKUP can.
Practice workbook
Frequently asked questions
How do I do a horizontal lookup in Excel?
What's the difference between HLOOKUP and VLOOKUP?
How do I do a two-way lookup with HLOOKUP?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class