XLOOKUP works sideways the moment you hand it row ranges: =XLOOKUP("Q3", A1:D1, A2:D2) searches the header row for Q3 and returns the value below it. The same six arguments work identically; only the orientation changes. It replaces HLOOKUP the same way vertical XLOOKUP replaces VLOOKUP.
Horizontal XLOOKUP in Google Sheets: Replace HLOOKUP
Use XLOOKUP horizontally in Google Sheets: search across a row and return from another row. Everything HLOOKUP does, without the row index number.
Sheets Bootcamp
July 28, 2026
Table of Contents
Quick Answer
Some tables grow sideways instead of down: months across the top, one metric per row. Looking up “March’s revenue” in that layout is a horizontal lookup, and the classic tool was HLOOKUP, which shares every weakness of its vertical sibling. XLOOKUP handles the horizontal case with the exact same syntax you already know.
In This Guide
- Row Ranges Instead of Column Ranges
- A Quarterly Table Example
- Replacing HLOOKUP
- Returning a Whole Column of Results
- Mixing Directions: The Two-Way Lookup
- Related Google Sheets Tutorials
Row Ranges Instead of Column Ranges
Nothing in XLOOKUP’s arguments says “column.” The lookup range and result range are just ranges, and their shape steers the search:
A2:A10andC2:C10are one column wide: XLOOKUP searches downwardA1:D1andA2:D2are one row tall: XLOOKUP searches across
The one rule is that both ranges must share the same orientation and size: two rows of four cells each, or two columns of nine cells each. Mismatched shapes fail, the same as in the vertical case.
A Quarterly Table Example
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Q1 | Q2 | Q3 | Q4 |
| 2 | 100 | 200 | 300 | 400 |
Find Q3’s value:
=XLOOKUP("Q3", A1:D1, A2:D2) XLOOKUP searches across row 1, finds Q3 in column C, and returns 300 from the same position in row 2. We verified this in a live sheet: the row-range form returns exactly the value beneath the matched header.
Every other argument works unchanged. A missing_value guards against a quarter that does not exist, match modes allow approximate and wildcard matching across the row, and search_mode -1 searches right-to-left for the last match.
Replacing HLOOKUP
The HLOOKUP version of the same lookup:
=HLOOKUP("Q3", A1:D2, 2, FALSE) The 2 counts rows down from the header, and the FALSE forces exact matching, the same two traps VLOOKUP carries. Insert a row inside the range and the index silently points at the wrong data; forget the FALSE and a missing quarter returns a neighbor.
The XLOOKUP translation drops both:
| HLOOKUP | XLOOKUP equivalent |
|---|---|
| =HLOOKUP(“Q3”, A1:D2, 2, FALSE) | =XLOOKUP(“Q3”, A1:D1, A2:D2) |
| =HLOOKUP(B9, A1:M40, 12, FALSE) | =XLOOKUP(B9, A1:M1, A12:M12) |
| =IFERROR(HLOOKUP(“Q5”, A1:D2, 2, FALSE), 0) | =XLOOKUP(“Q5”, A1:D1, A2:D2, 0) |
And one thing HLOOKUP cannot do at all: return from a row above the search row. If your labels sit on row 10 and the data on row 3, =XLOOKUP(key, A10:M10, A3:M3) just works, the horizontal version of the left lookup.
Returning a Whole Column of Results
The same spilling behavior that returns several columns vertically returns several rows horizontally. Widen the result range downward:
=XLOOKUP("Q2", A1:D1, A2:D4) With three data rows under the headers, the formula finds the Q2 column and spills its three values downward from the formula cell: one quarter’s entire column of metrics from one formula. The cells below the formula must be empty, or the whole thing returns #REF!, exactly like the horizontal spill case.
Mixing Directions: The Two-Way Lookup
A table with labeled rows AND labeled columns (“revenue by store, by quarter”) needs a two-way lookup: find the row by one key, the column by another. Nest a horizontal XLOOKUP inside a vertical one:
=XLOOKUP("Riverside", A2:A6, XLOOKUP("Q3", B1:E1, B2:E6)) The inner XLOOKUP searches the header row for Q3 and, because its result range spans all the data rows, hands back Q3’s whole column. The outer XLOOKUP then searches the store names and returns Riverside’s row from that column. Two keys, one intersection value.
The same pattern with INDEX and two MATCHes is covered in two-way lookups; the XLOOKUP version reads more naturally once horizontal lookups are familiar.
Related Google Sheets Tutorials
- XLOOKUP: The Complete Guide: The vertical case and all six arguments
- XLOOKUP Return Multiple Columns: Spilling in both directions
- Two-Way Lookup with INDEX MATCH: The classic intersection pattern
- XLOOKUP Match Modes: They work sideways too
- XLOOKUP vs VLOOKUP: The vertical replacement argument
Frequently Asked Questions
Can XLOOKUP search horizontally in Google Sheets?
What is the difference between XLOOKUP and HLOOKUP?
How does XLOOKUP know whether to search vertically or horizontally?
Can a horizontal XLOOKUP return an entire column of values?
Should I still use HLOOKUP in Google Sheets?
You've googled this formula before. Probably more than once.
Basic Training is a free course inside a real Google Sheet that grades every formula the moment you press Enter. 7 lessons, about 40 minutes, and this loop ends.
Try the Sheet That Grades YouFree. No spam, ever.