Excel OFFSET function

Returns a range shifted from a cell, with the size you choose. Ideal for "the last N months". In Spanish Excel it is called DESREF.

Syntax

English Excel

=OFFSET(reference, rows, cols, [height], [width])

Spanish Excel (Mexico)

=DESREF(ref, filas, columnas, [alto], [ancho])

Spanish Excel (Spain, Latin America)

=DESREF(ref; filas; columnas; [alto]; [ancho])

ArgumentWhat it is
referenceThe starting cell.
rowsHow many rows to move down (negative moves up).
colsHow many columns to move right.
heightoptionalHow many rows the resulting range has.
widthoptionalHow many columns the resulting range has.

Example

OFFSET(start, rows, columns, height, width) returns a range shifted from a cell. With COUNT you know how many months are filled in, so the range moves by itself every time you add one.

=SUM(OFFSET(B1,COUNT(B2:B13)-2,0,3,1))

Common mistake

Combine it with COUNT so the range grows by itself as data is added. Like INDIRECT, it is volatile.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice OFFSET

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

OFFSET: the last 3 months

OFFSET(start, rows, columns, height, width) returns a range shifted from a cell. With COUNT you know how many months are filled in, so the range moves by itself every time you add one.

Example=SUM(OFFSET(B1,COUNT(B2:B13)-2,0,3,1))DESREF = OFFSETPROMEDIO = AVERAGE
Step 1/2

In E1, add up the sales of the last 3 filled-in months with OFFSET, so it updates when September is entered.

E1
ABCDEF
1MonthSalesLast 3 months
2Jan84,000.00Average of last 3
3Feb91,500.00
4Mar78,200.00
5Apr102,300.00
6May96,800.00
7Jun110,400.00
8Jul99,700.00
9Aug118,900.00
10Sep
11Oct
12Nov
13Dec
14

Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.

Frequently asked questions

What is OFFSET called in Spanish?
In Spanish Excel it is DESREF. The formula =SUM(OFFSET(B1,COUNT(B2:B13)-2,0,3,1)) is written =SUMA(DESREF(B1;CONTAR(B2:B13)-2;0;3;1)) (or with commas in Mexico).
Why does OFFSET use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common OFFSET mistake?
Combine it with COUNT so the range grows by itself as data is added. Like INDIRECT, it is volatile.