# HLOOKUP in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/hlookup/

HLOOKUP is VLOOKUP turned sideways. It finds a key in the first row of a range and returns the value from another row of the same column. It fits tables where months or years run across the top.

## Syntax

```
HLOOKUP(search_key, range, index, [is_sorted])
```

## Arguments

- `search_key` (any, required: yes): The value to find in the first row of range.
- `range` (range, required: yes): The table to search. The key row must be its top row.
- `index` (number, required: yes): Which row of range to return, counted from 1 at the key row.
- `is_sorted` (boolean, required: no): FALSE for an exact match. TRUE or omitted means approximate match on a sorted first row.

## Examples

The examples use this table, starting in A1:

| Month | Jan | Feb | Mar |
|---|---|---|---|
| Sales | 120 | 95 | 140 |
| Orders | 12 | 9 | 15 |
| Returns | 1 | 0 | 2 |

```
=HLOOKUP("Feb", A1:D4, 2, FALSE)
```

Result: `95`

Sales for February: the key is in the top row, row 2 holds the sales. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=HLOOKUP("Mar", A1:D4, 3, FALSE)
```

Result: `15`

Orders for March, from the third row of the table. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=IFERROR(HLOOKUP("Apr", A1:D4, 2, FALSE), "no data")
```

Result: `no data`

A month that is not in the table. IFERROR replaces #N/A with your text. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ARRAYFORMULA(HLOOKUP({"Jan", "Mar"}, A1:D4, 4, FALSE))
```

Result: 

| 1 | 2 |
|---|---|


Two keys in a row: one result per key, side by side. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=HLOOKUP("feb", A1:D4, 2, FALSE)
```

Result: `95`

The match ignores case, so "feb" finds "Feb". Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- The key must sit in the top row of range. A label in the first column, such as "Sales", returns #N/A.
- An index larger than the number of rows in range returns #REF!, for example 5 on a four-row table.
- Without is_sorted the match is approximate and expects a sorted top row. Write FALSE for names and codes.
- If the labels are in a column and the values to the right, use VLOOKUP, or XLOOKUP, which works in both directions.

## Compared with Excel

Same arguments as Excel HLOOKUP.

## Related functions

- [VLOOKUP](https://goingstellar.ro/reference/sheets/vlookup/)
- [XLOOKUP](https://goingstellar.ro/reference/sheets/xlookup/)
- [MATCH](https://goingstellar.ro/reference/sheets/match/)
- [INDEX](https://goingstellar.ro/reference/sheets/index/)
- [IFERROR](https://goingstellar.ro/reference/sheets/iferror/)
- [LOOKUP](https://goingstellar.ro/reference/sheets/lookup/)

## Sources

- [HLOOKUP (Docs Editors Help)](https://support.google.com/docs/answer/3093375)

