FormulaCraft

How to create a dynamic range with OFFSET in Excel and Google Sheets

Topic:Data cleaning & shaping
Excel & Google Sheets
=SUM(OFFSET(A2,0,0,COUNTA(A2:A7),1))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Anchor OFFSET at the first data cell, A2, with zero row and column shift.
  2. 2Set the height to COUNTA(A2:A7) so it always spans exactly the filled rows — here 5.
  3. 3Wrap in SUM (or feed the OFFSET into Name Manager) — the total stays correct as rows are added: 10+20+30+40+50 = 150.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Why use a dynamic range at all?

So charts and formulas automatically include new rows. Without it you must edit ranges by hand every time data is appended.

More on Data cleaning & shaping

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: