OFFSET Function

Excel Functions › Lookup & Reference

All Excel versions Lookup & Reference

The Excel OFFSET function returns a reference that is a given number of rows and columns away from a starting cell — and can optionally resize that reference into a whole range. It powers dynamic ranges and rolling calculations, but it is volatile: it recalculates on every worksheet change, so heavy use can slow workbooks where INDEX would not.


Quick answer: to get the cell 3 rows down and 1 column right of A1:
=OFFSET(A1, 3, 1)
Add height and width to return a range instead of a single cell — e.g. =SUM(OFFSET(A1, 1, 1, 3, 1)) sums the 3-cell column starting at B2.

Syntax

=OFFSET(reference, rows, cols, [height], [width])
ArgumentDescription
referenceRequiredThe starting cell or range that the offset is measured from.
rowsRequiredRows to move down (positive) or up (negative) from the top-left of reference. 0 = stay in the same row.
colsRequiredColumns to move right (positive) or left (negative). 0 = stay in the same column.
heightOptionalNumber of rows in the returned reference. Defaults to the height of reference. Must be positive.
widthOptionalNumber of columns in the returned reference. Defaults to the width of reference. Must be positive.

OFFSET is volatile. It recalculates every time anything in the workbook changes — not just its inputs. A handful of OFFSETs is harmless; thousands can make a workbook crawl. INDEX can build the same dynamic references without volatility.

Worked examples: single cells and rolling ranges

OFFSET never moves anything — it just points somewhere. From the header cell B1 below, moving down 3 rows and 0 columns lands on March’s sales:

AB
1MonthSales
2Jan$8,200
3Feb$7,900
4Mar$8,600
5Apr$9,100
6May$9,800
7Jun$10,400
=OFFSET(B1, 3, 0) // returns $8,600 - March

The real power is the height/width pair, which turns the result into a range other functions can consume. A rolling “last 3 months” total anchored to the bottom of the list:

=SUM(OFFSET(B7, -2, 0, 3, 1)) // B5:B7 -> $29,300

And a version that finds the bottom automatically, so it keeps working as rows are added:

=SUM(OFFSET(B1, COUNT(B2:B100)-2, 0, 3, 1)) // always the last 3 numeric rows

Try it: interactive OFFSET demo

Live demo

Drag the sliders and watch which cells =OFFSET(A1, rows, cols, height, width) grabs. The starting cell A1 is outlined in green. Push the range off the grid to see #REF!.





ABCDE
11020304050
21121314151
31222324252
41323334353
51424344454
61525354555
Result:

OFFSET vs INDEX: the non-volatile alternative

Almost everything OFFSET does, INDEX can do without volatility. INDEX with a row number returns a reference too, so it can anchor dynamic ranges:

=SUM(B2:INDEX(B2:B100, COUNT(B2:B100))) // sum down to the last entry - non-volatile
=SUM(OFFSET(B1, 1, 0, COUNT(B2:B100), 1)) // same result, but recalculates constantly

Prefer OFFSET when the shape of the range must move and resize from a single anchor (rolling windows, moving averages) and the workbook is small. Prefer INDEX — or, in Excel 365, dynamic arrays like FILTER and TAKE/DROP — everywhere else.

Dynamic named ranges: the classic pattern =OFFSET($A$2,0,0,COUNTA($A:$A)-1,1) inside Name Manager makes charts and validation lists grow with the data. In Excel 365, a spilled range reference like A2# does the same job non-volatilely.

Errors & common pitfalls

#REF! — the offset falls off the sheet. Moving up past row 1 or left past column A (e.g. =OFFSET(A1, -1, 0)) returns #REF! because the resulting reference doesn’t exist.

#VALUE! — height or width of 0 or a non-number. Both must be positive whole numbers when supplied. height/width of zero is invalid.

Pitfall: a bare OFFSET range shows #VALUE! in one cell. =OFFSET(A1,1,0,3,1) returns a 3-cell range — pre-365 Excel can’t display that in a single cell. Wrap it in SUM, AVERAGE, COUNT, etc., or let Excel 365 spill it.

Pitfall: volatility cascades. Every cell that depends on an OFFSET also recalculates on every change. Trace long chains before blaming Excel for slowness — and consider INDEX.

Pitfall: OFFSET hides its target. Formula auditing (Trace Precedents) can’t follow OFFSET’s computed reference, and inserting rows won’t adjust the rows/cols numbers. Document what the offsets mean.

Practice workbook

📊
Download the free OFFSET practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Why is OFFSET considered slow?
OFFSET is volatile: Excel re-evaluates it on every worksheet change, even when its inputs didn’t move, and everything downstream of it recalculates too. A few are fine; thousands hurt. INDEX builds equivalent references non-volatilely.
Can OFFSET use negative numbers?
Yes — negative rows moves up and negative cols moves left. =OFFSET(B7, -2, 0, 3, 1) starts 2 rows above B7 and returns B5:B7. You get #REF! only if the result would leave the sheet.
Does OFFSET return a value or a reference?
A reference. That’s why it works inside SUM, AVERAGE, MATCH, even as the range of another formula. Pointed at a single cell on its own, Excel simply shows that cell’s value.
How do I build a dynamic range with OFFSET?
The classic named-range pattern is =OFFSET($A$2, 0, 0, COUNTA($A:$A)-1, 1) — anchored at A2, as tall as there are entries. In Excel 365 prefer a spilled reference like A2# or an Excel Table, which grow without volatility.
What should I use instead of OFFSET?
INDEX for dynamic references (B2:INDEX(B2:B100,n)), Excel Tables for growing data, and in Excel 365 the TAKE/DROP and FILTER dynamic array functions for rolling windows and subsets.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: INDEX · MATCH · INDIRECT · ADDRESS · XLOOKUP