# OFFSET Function

> Return a reference shifted by rows and columns with OFFSET in TX Sheet Control: height, width, dynamic ranges for SUM, spilling and the #REF! error.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > OFFSET Function
- **279 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/offset/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/offset/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/offset/llms-full.txt

---

Return a reference that is offset from a starting reference by a number of rows and columns. `reference` is the starting cell or range, `rows_or_a1` the number of rows to move (negative moves up) and `columns` the number of columns to move (negative moves left). `height` and `width` set the size of the returned range and default to the size of `reference`. A range that would start outside the sheet, or a `height` or `width` of 0, returns `#REF!`. A returned range of several cells spills, or can be passed to a function such as `SUM`.

### Syntax

```text
OFFSET(reference, rows_or_a1, columns, height, width)
```

Category: Lookup. Minimum arguments: 3. Maximum arguments: 5.

Available for supported offline calculation.

### Examples

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

With the values 1, 5 and 3 in A1:A3, the formula spills 5 and 3, the two cells starting one row below A1; `=SUM(OFFSET(A1,1,0,2,1))` returns 8.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [ODDLYIELD Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/oddlyield/llms-full.txt)
- **Next:** [OR Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/or/llms-full.txt)
