Ravindra BagaleCourses & study guides Track your progress

Excel OFFSET Function

Chala mitrano — oFFSET moves from a start cell like a chess piece, then can resize the block. Powerful for rolling ranges; volatile, so use carefully.

Fictional sample data for learning. Rolling 3-month sales window (Indore FMCG / Chicago distributor). Mixed ₹ and $.

Purpose

Return a range that starts a given number of rows and columns away from a starting cell, with optional height and width.

Return value

A reference (range) you can wrap in SUM, AVERAGE, or INDEX — not always a single number by itself.

Syntax

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

Arguments

ArgumentRequired?Description
referenceRequiredStarting cell or range.
rowsRequiredRows to move down (negative = up).
colsRequiredColumns to move right (negative = left).
heightOptionalHow many rows tall the returned range should be.
widthOptionalHow many columns wide the returned range should be.

Version

Excel 2007 and later, Microsoft 365, LibreOffice Calc. Volatile — recalculates often; prefer INDEX for speed on huge models.

How to use — Why → What → How

Why: Rolling last-3-months totals need a range that moves when new months appear. OFFSET builds a moving window: from the first month cell, height 3 totals Jan through Mar for an Indore FMCG pack or a Chicago dollar distributor sheet. It is volatile — Excel reca...

What: OFFSET returns a reference shifted from reference by rows/cols, sized by height/width. Read the arguments table carefully; each one changes the answer in a specific way.

How — numbered steps:

  1. Pick the anchor cell (first month amount).
  2. Type =SUM(OFFSET(.
  3. Enter rows/cols shift (often 0,0 to start at anchor).
  4. Set height to the window size (e.g. 3).
  5. Close brackets and check the total.
  6. Compare your result with the Answers sheet only after you attempt it.
  7. Write one sentence in your own words explaining when you would use this function at work.

Ravindra Bagale's Tip

Friends, wrap OFFSET in SUM to total a moving window: SUM(OFFSET(first, 0, 0, 3, 1)) for three rows.

Ravindra Bagale's Tip

On very large workbooks INDEX usually recalculates faster than OFFSET. Mentors mention this in interviews.

Ravindra Bagale's Tip

Friends, after class open a blank sheet and rebuild one OFFSET example without looking. That memory test beats re-reading the page.

Download practice file: practice-offset.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Single cell shift

Indore sheet; start at B2, move 2 rows down.

MonthSales (₹)
Jan100
Feb120
Mar140
Apr130
Formula: =OFFSET(B2, 2, 0)

Result: 140

What it means: From B2, down 2 rows → Mar sales.

2) Rolling 3-month SUM

Total Jan–Mar starting at B2.

MonthSales (₹)
Jan100
Feb120
Mar140
Apr130
Formula: =SUM(OFFSET(B2, 0, 0, 3, 1))

Result: 360

What it means: Height 3 grabs Jan+Feb+Mar = 100+120+140.

3) Shift window to Feb–Apr

Same list; start one row lower.

MonthSales (₹)
Jan100
Feb120
Mar140
Apr130
Formula: =SUM(OFFSET(B2, 1, 0, 3, 1))

Result: 390

What it means: Rows shift 1 → Feb+Mar+Apr = 120+140+130.

4) Chicago $ column

USD monthly figures in column C.

MonthINRUSD
Jan10012
Feb12014
Mar14015
Formula: =SUM(OFFSET(C2, 0, 0, 3, 1))

Result: 41

What it means: Three USD months: 12+14+15.

5) #REF! beyond sheet

Shift too far down from B2.

Sales
100
Formula: =OFFSET(B2, 1000000, 0)

Result: #REF!

What it means: Reference lands outside the sheet.

6) Classroom recap

Quick check before you close the OFFSET lesson.

MonthSales (₹)
Jan100
Feb120
Mar140
Formula: =OFFSET(B2, 2, 0)

Result: 140

What it means: Same pattern as example 1 — rebuild it from memory on the Practice sheet, then check Answers.

About this data. Small demo rows for learning. Real sheets are longer; the same formula pattern scales when columns are clean.

Common errors and fixes

#REF! — Shift lands outside the worksheet. Fix: Reduce rows/cols.
Wrong total — Height/width off by one. Fix: Count the window carefully.
Slow file — Many volatile OFFSETs. Fix: Replace with INDEX where possible.

Notes and tips

  • OFFSET is volatile: it recalculates whenever anything calculates.
  • Height and width must be positive (Excel).
  • Dynamic arrays reduce the need for OFFSET in modern Excel.
  • OFFSET builds a moving window: from the first month cell, height 3 totals Jan through Mar for an Indore FMCG pack or a Chicago dollar distributor sheet. It is volatile — Excel recalculates it often — so heavy dashboards may prefer INDEX for speed. Negative rows move up; landing outside the sheet yields #REF!. Dynamic array functions reduce how often you need OFFSET today, but rolling-window interview questions still appear.
  • OFFSET vs INDEX: both can describe ranges; INDEX is non-volatile and usually preferred on large models.
  • Fictional sample data only — practice amounts and names are made for learning.
  • After you finish the 10 tasks, re-read the errors table once; most class mistakes are listed there.
  • Keep ranges locked with absolute references when you copy formulas down a column of inputs.
  • Say the business question in plain words before you type the equals sign — it prevents wrong arguments.

In real work

OFFSET builds a moving window: from the first month cell, height 3 totals Jan through Mar for an Indore FMCG pack or a Chicago dollar distributor sheet. It is volatile — Excel recalculates it often — so heavy dashboards may prefer INDEX for speed. Negative rows move up; landing outside the sheet yields #REF!. Dynamic array functions reduce how often you need OFFSET today, but rolling-window interview questions still appear.

How it compares

OFFSET vs INDEX: both can describe ranges; INDEX is non-volatile and usually preferred on large models.

Interview corner

Is OFFSET volatile?
Yes.
How do you total three rows starting at B2?
SUM(OFFSET(B2,0,0,3,1)).
Non-volatile alternative?
INDEX-based ranges.

INDEX, INDIRECT, SUM, MATCH

Practice tasks (10)

  1. Task 1. Return Mar sales with OFFSET from B2.
    Hint: rows = 2.
  2. Task 2. Sum Jan–Mar with height 3.
    Hint: wrap in SUM.
  3. Task 3. Sum Feb–Apr by shifting rows by 1.
    Hint: rows argument.
  4. Task 4. Sum three USD months.
    Hint: anchor on the USD column.
  5. Task 5. Create a #REF! on purpose, then fix it.
    Hint: huge row shift.
  6. Task 6. Write one sentence on volatility.
    Hint: recalculates often.
  7. Task 7. Rebuild the 3-month sum with INDEX instead.
    Hint: interview comparison.
  8. Task 8. Use a cell for the height so the window is adjustable.
    Hint: height references G1.
  9. Task 9. Offset one column right and return that cell.
    Hint: cols = 1.
  10. Task 10. Bonus: chart the rolling total.
    Hint: helper column of OFFSET sums.

Quick quiz

Q1. OFFSET alone always displays a single number.
Q2. SUM(OFFSET(B2,0,0,3,1)) with 100,120,140 totals:
Q3. OFFSET is considered:
Q4. Negative rows means:
Q5. A faster non-volatile cousin for many cases:

Answers: Q1=False, Q2=360, Q3=Volatile, Q4=Move up, Q5=INDEX (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: OFFSET
OFFSET revision card