# LOOKUP in Google Sheets: syntax and examples

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

LOOKUP searches a sorted row or column for the largest value that does not exceed your key. It then returns the item at the same position in a result range. It suits bands such as grades or tax brackets, not exact-match lookups.

## Syntax

```
LOOKUP(search_key, search_range|search_result_array, [result_range])
```

## Arguments

- `search_key` (any, required: yes): The value to look for. The result belongs to the largest value that is not greater than it.
- `search_range|search_result_array` (range, required: yes): A sorted row or column to search, or a two-line array that holds both search and result.
- `result_range` (range, required: no): The row or column to return from. It must match the length of the search range.

## Examples

The examples use this table, starting in A1:

| Min | Grade | Student | Points |
|---|---|---|---|
| 0 | F | Ana | 87 |
| 60 | D | Bob | 45 |
| 70 | C | Cris | 72 |
| 80 | B | Dan | 95 |
| 90 | A | Eva | 60 |

```
=LOOKUP(87, A2:A6, B2:B6)
```

Result: `B`

87 falls between 80 and 90, so the grade for 80 is returned. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=LOOKUP(D2, A2:A6, B2:B6)
```

Result: `B`

The same lookup with the key taken from a cell. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ARRAYFORMULA(LOOKUP(D2:D6, A2:A6, B2:B6))
```

Result: 

| B |
|---|
| F |
| C |
| A |
| D |

A grade for every student from one formula. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=LOOKUP(100, A2:A6, B2:B6)
```

Result: `A`

A key above the last value returns the last result. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ARRAYFORMULA(LOOKUP(2, 1/(D2:D6>70), C2:C6))
```

Result: `Dan`

A classic trick: the last student with more than 70 points. Rows that fail the test become errors and are skipped. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- The search range must be sorted ascending. On unsorted data LOOKUP returns a wrong item without an error: on 10, 80, 70 a search for 75 returns the first result, not the one for 70.
- A key smaller than the first value returns #N/A.
- A result range shorter than the search range returns #NUM!.
- A test such as 1/(D2:D6>70) needs ARRAYFORMULA around LOOKUP. Without it the same formula returns #N/A.

## Compared with Excel

Same vector form as Excel LOOKUP. The 1/(condition) trick works in Sheets only inside ARRAYFORMULA, while Excel evaluates it directly.

## Questions and answers

### Should I use LOOKUP or VLOOKUP?

Use VLOOKUP or XLOOKUP for exact keys. LOOKUP fits ranges of thresholds, where the key falls between two values.

## Related functions

- [VLOOKUP](https://goingstellar.ro/reference/sheets/vlookup/)
- [HLOOKUP](https://goingstellar.ro/reference/sheets/hlookup/)
- [XLOOKUP](https://goingstellar.ro/reference/sheets/xlookup/)
- [INDEX](https://goingstellar.ro/reference/sheets/index/)
- [MATCH](https://goingstellar.ro/reference/sheets/match/)
- [ARRAYFORMULA](https://goingstellar.ro/reference/sheets/arrayformula/)

## Sources

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

