
Return a reference that is a specified number of rows and columns away from a starting cell or range. OFFSET is useful for dynamic ranges, rolling calculations, and reference shifting.
The Excel OFFSET function returns a reference that is a specified number of rows and columns from a starting reference. It can return either a single cell or a larger range, depending on whether you also provide height and width arguments.
That makes OFFSET useful when the location of the target range is not fixed. Instead of hard-coding one address, you can describe how far to move from an anchor cell and how large the returned range should be.
OFFSET is powerful, but it is also a volatile function. That means it recalculates whenever Excel recalculates, so in very large workbooks it can affect performance if used heavily.
Returns a cell or range by shifting from an anchor reference by a specified number of rows and columns.
Returns a reference, not a final value by itself, so it is often wrapped inside functions such as SUM, AVERAGE, or COUNTA.
=OFFSET(reference, rows, cols, [height], [width])
reference is the starting point, rows and cols tell Excel how far to move, and the optional height and width arguments define the size of the returned range.
If height and width are omitted, OFFSET returns a reference of the same size as the original reference. If the shift moves the reference outside the worksheet, Excel returns #REF!.
Because OFFSET returns a reference, it is often easier to understand if you picture the function in two steps: first move to a new top-left position, then resize the returned range if height or width is provided.
OFFSET is often compared with functions that also help build dynamic references, but the way it works is different.
| Function | Main Role | Use When |
|---|---|---|
OFFSET |
Shift and resize a reference | You want to describe a range relative to an anchor cell or range |
INDEX |
Return a value or reference by position | You want a non-volatile alternative for many lookup patterns |
ADDRESS |
Build a reference as text | You need a text address rather than a shifted live reference |
INDIRECT |
Evaluate text as a reference | You already have a text address and need Excel to resolve it |
OFFSET is often the clearest choice when the reference should be defined relative to a starting point. If performance matters and the pattern can be expressed another way, INDEX is often worth considering.
One common use of OFFSET is rolling calculations. For example, a workbook might need the last 3 rows, the next 12 months, or a moving summary window that changes over time. OFFSET can describe that moving range without rewriting the formula each time.
Another use is dynamic named ranges. If the size of a list changes, OFFSET can return a range whose height or width depends on another formula such as COUNTA.
The main caution is volatility. OFFSET recalculates frequently, so using it in many cells across a very large workbook can slow calculation. That does not make the function wrong, but it does mean it should be used deliberately.
This example uses OFFSET to build a rolling calculation window. Instead of summing a fixed range forever, the formula shifts the starting point so it always returns the latest block of rows.
That is useful in dashboards and running reports where the "last 3 entries" or "current window" should update automatically as more data is added.
=SUM(OFFSET(A1, COUNTA(A:A)-3, 0, 3, 1))
Starting from A1, return the value one row down.
Here OFFSET starts from A1, moves one row down and one column right, and then returns a 2-by-2 block. That means the reference shifts to B2:C3 before the outer SUM adds it.
This is a good example of how the function works in two parts: first move from the anchor, then decide the size of the returned area.
=SUM(OFFSET(A1, 1, 1, 2, 2))
Starting from A1, return the value two columns to the right.
This example makes the returned range dynamic by using a cell value for the height. As the number in B5 changes, the reference returned by OFFSET grows or shrinks automatically.
That is useful when the size of the active list is not fixed. The formula structure stays the same, but the returned reference adapts to the model.
=OFFSET(A1, 0, 0, B5, 1)
Sum a range that starts at A1 and covers three rows.
This example shows that OFFSET can move backward as well as forward. Starting from A10 and moving up 5 rows returns a reference to A5.
That helps make the function easier to picture: it is not tied to moving only down or right. It can move in any direction from the starting cell, as long as the final reference still lands in a valid place.
=OFFSET(A10, -5, 0)
Starting from A10, return the value five rows up.
OFFSET is useful when a range should move from a starting point instead of staying fixed. In this lesson, that included simple shifts, moving windows, resized blocks, and dynamic ranges that grow or shrink based on another value.
The easiest way to read it is in two steps: start from the anchor, then move and size the result. Also remember that OFFSET returns a reference, so it is often wrapped inside functions like SUM or AVERAGE.
OFFSET returns a shifted and optionally resized reference.=OFFSET(reference, rows, cols, [height], [width]).Tell your friends about this post