# OFFSET in Google Sheets: syntax and examples

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

OFFSET starts at a reference, moves by a number of rows and columns, and returns that cell or a range of the height and width you give. It is useful for ranges whose size depends on a count, such as the last N rows.

## Syntax

```
OFFSET(cell_reference, offset_rows, offset_columns, [height], [width])
```

## Arguments

- `cell_reference` (range, required: yes): The starting cell or range.
- `offset_rows` (number, required: yes): Rows to move down, or up when negative.
- `offset_columns` (number, required: yes): Columns to move right, or left when negative.
- `height` (number, required: no): Rows in the returned range.
- `width` (number, required: no): Columns in the returned range.

## Examples

The examples use this table, starting in A1:

| Month | Sales | Cost |
|---|---|---|
| Jan | 100 | 60 |
| Feb | 120 | 70 |
| Mar | 90 | 50 |
| Apr | 150 | 80 |
| May | 130 | 75 |

```
=OFFSET(A1, 2, 1)
```

Result: `120`

Start at A1, move 2 rows down and 1 column right: the cell B3. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(OFFSET(B1, 1, 0, 3, 1))
```

Result: `310`

A range 3 rows high starting under B1: B2:B4. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=OFFSET(A1, 1, 1, 2, 2)
```

Result: 

| 100 | 60 |
|---|---|
| 120 | 70 |

A 2 by 2 block starting at B2. The result spills into neighbouring cells. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(OFFSET(B1, COUNTA(B:B)-3, 0, 3, 1))
```

Result: `370`

The last three values of a growing column. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ROWS(OFFSET(A1, 0, 0, 3, 2))
```

Result: `3`

Height of the range OFFSET builds. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- Moving outside the sheet, for example up from row 1, returns #REF!.
- A height or width of 0 returns #VALUE!. Use at least 1.
- Typed alone in a cell, OFFSET with a height and width spills a block of values, so leave empty cells to its right and below.
- The offsets count from the starting cell, not from the corner of the range, so OFFSET(A1, 1, 1) is B2.

## Compared with Excel

Same syntax in Excel.

## Related functions

- [INDEX](https://goingstellar.ro/reference/sheets/index/)
- [INDIRECT](https://goingstellar.ro/reference/sheets/indirect/)
- [MATCH](https://goingstellar.ro/reference/sheets/match/)
- [ROW](https://goingstellar.ro/reference/sheets/row/)
- [COLUMN](https://goingstellar.ro/reference/sheets/column/)
- [ADDRESS](https://goingstellar.ro/reference/sheets/address/)

## Sources

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

