Excel OFFSET function
OFFSET starts at a cell and moves down or right, returning the range it lands on. Its real use is a moving range — the last 12 rows, however many there are. The catch is that it is volatile: every change anywhere recalculates it, so a sheet full of OFFSETs gets slow. Prefer INDEX wherever it can do the same job.
Lookup & reference · Available in: Excel 97 and every desktop version since
Syntax
OFFSET(reference, rows, cols, [height], [width])What it returns A reference to the range reached by moving from the starting point.
| Arguments | ||
|---|---|---|
| reference | required | The starting point; must be a real cell or range reference, not a computed value. |
| rows | required | Rows to move down (negative moves up). |
| cols | required | Columns to move right (negative moves left). |
| height | optional | Height of the returned range in rows; defaults to the reference's own height. |
| width | optional | Width of the returned range in columns; defaults to the reference's own width. |
Examples
Always total the last three days
| Date | Sales |
| 2026-11-20 | 420 |
| 2026-11-21 | 380 |
| 2026-11-22 | 510 |
| 2026-11-23 | 465 |
= SUM(OFFSET(B2,COUNTA(B2:B5)-3,0,3,1))→ 1355
COUNTA finds four days of data, minus three gives an offset of one row, so the range starts at B3 and covers three rows (11-21 to 11-23): 380+510+465 = 1355. Add a new day and the total follows without editing the range.
Common mistakes
- 1.Using it for dynamic ranges across thousands of rows and dozens of formulas — every keystroke recalculates all of them and typing starts to lag. The INDEX equivalent is not volatile.
- 2.Offsetting past the edge of the sheet, which returns #REF!. Negative rows are easy to overshoot.
- 3.Treating the result as a plain value. OFFSET returns a reference, which behaves differently inside array formulas.
How to use it
- 1.Click the cell where the result should appear.
- 2.Type = then the function name, and press Tab to accept it.
- 3.Enter each argument separated by commas; ranges can be dragged with the mouse.
- 4.Press Enter. Drag the fill handle down if the same formula applies to more rows.
Frequently asked questions
What is the syntax of OFFSET?
OFFSET(reference, rows, cols, [height], [width]). What it returns: A reference to the range reached by moving from the starting point.
Which Excel versions support OFFSET?
Excel 97 and every desktop version since. It is available in every desktop version unless the note above says otherwise.
Why does OFFSET return an error instead of a value?
Using it for dynamic ranges across thousands of rows and dozens of formulas — every keystroke recalculates all of them and typing starts to lag. The INDEX equivalent is not volatile.