# How to use HLOOKUP to look up a value in a row in Excel

Use `=HLOOKUP(J1,B1:G4,2,FALSE)`: it searches the top row of the table and returns the value from the row number you give, here row 2.

**Excel:** `=HLOOKUP(J1,B1:G4,2,FALSE)` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G | H | I | J |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Month | Jan | Feb | Mar | Apr | May | Jun |  | Month | Apr |
| Revenue | 48200 | 51750 | 49300 | 56800 | 60150 | 58400 |  | Revenue |  |
| Expenses | 39100 | 40250 | 41800 | 43900 | 44700 | 45200 |  |  |  |
| Orders | 512 | 548 | 530 | 601 | 644 | 619 |  |  |  |

Formula in J2: `=HLOOKUP(J1,B1:G4,2,FALSE)`

Result: $56,800

## How it works

HLOOKUP is VLOOKUP turned sideways. It looks for Apr in the first row of `B1:G4`, then goes down to the 2nd row of that table, which is Revenue, and returns 56,800. `FALSE` asks for an exact match.

## Other ways

- `=XLOOKUP(J1,B1:G1,B2:G2)`: XLOOKUP searches rows as well as columns: give it the header row and the row to return. Excel 2021, Microsoft 365 and Google Sheets.
- `=INDEX(B2:G2,MATCH(J1,B1:G1,0))`: Works in every version and keeps working when rows are inserted.

## Common mistakes

- The row number counts from the top of the table, and the header row is row 1. Revenue is 2, not 1.
- Without FALSE, HLOOKUP does an approximate match and needs the first row sorted.
- Inserting a row inside the table shifts the row you meant. XLOOKUP and INDEX/MATCH don't have that problem.

## Questions

**How do I choose the row by its label too?**

Find the row number with MATCH: `=HLOOKUP(J1,B1:G4,MATCH(I2,A1:A4,0),FALSE)` returns the row named in I2.

**Can HLOOKUP do an approximate match?**

Yes, with TRUE and the first row sorted from smallest to largest, for example thresholds across the top of a rate table.

**Should I use HLOOKUP or XLOOKUP?**

Use XLOOKUP if everyone has Excel 2021 or later. HLOOKUP still works and is fine for simple tables.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/hlookup-horizontal-lookup
