A dynamic named range in Excel automatically adjusts to include new data, eliminating the need to manually update chart references.
The OFFSET function combined with COUNT lets you build a rolling chart that always displays a specific number of recent data points such as the last 12 months.
Once you assign a dynamic named range to a chart's data source, the chart refreshes itself whenever you add new rows to your dataset.
You can edit dynamic named ranges at any time through Name Manager on the Formulas tab.
A dynamic named range in Excel is a named reference that automatically adjusts its boundaries as your data grows or shifts. Unlike a static named range, which points to a fixed set of cells (such as B1:B12), a dynamic named range uses a formula to expand or contract based on the actual data in your worksheet. You can create a dynamic named range using the OFFSET function, the INDEX function or a combination of other formulas.
This technique is especially useful for charts, data validation drop-downs and formulas that reference growing datasets. Instead of manually editing cell references every time you add a row, the named range handles the update for you.
Feature | Static Named Range | Dynamic Named Range |
|---|---|---|
Definition: | Points to a fixed cell range (e.g., B1:B12) | Uses a formula to determine its range automatically |
Updates automatically: | No | Yes |
Best for: | Data that never changes in size | Growing datasets, rolling charts, expanding lists |
Example formula: | =Sheet1!$B$1:$B$12 | =OFFSET(Sheet1!$B$1,COUNT(Sheet1!$B:$B),0,-12,1) |
Creating reports on a regular schedule is a common task for the business Excel user. When you need to create a Rolling chart that reflects data in a specific timeframe – such as the previous 12 months - you can quickly find yourself in a maintenance nightmare, updating your charts manually to include the new month's data and exclude the now "out of date" data. The good news is that with the OFFSET function, you can create a dynamic rolling chart that automatically refreshes your charts far more easily than adjusting cell references or deleting the old data.
The following steps demonstrate how to use the OFFSET function to create an annual rolling chart. We have a table that shows amounts of contaminate present in an imaginary water sample taken monthly. We want a chart that shows the current month's data along with the previous 11 months. To follow using our example below, download Excel Rolling Chart.xlsx
Our initial chart shows two years of data.

Before diving into the steps, make sure you have the following in place:
First, create a dynamic named range for the data that uses the OFFSET function to make it reflect a relative timeframe:
In this example our named range is AnnualData. (Note: if you want to follow along and create a new chart of your own, type your own range name in the textbox and substitute that name in the formulas below. See also Changing Names in the bonus paragraph at the end of this article.)
OFFSET(reference, rows, cols, [height], [width])
so the formula for our dynamic named range's data will be
=OFFSET('Research Data'!$B$1,COUNT('Research Data'!$B:$B),0,-12,1)
Notice that the COUNT function gives us a total number of rows in our table, and we then specify how many rows we want to include in the [height] argument. This is where you can change the number of months (for example) you want to include in your chart. If, instead, you added columns to your data each month, you would adjust your formula accordingly.
HINT! Excel will try to be "helpful" and add cell references or ranges to the Refers to: text field if you click on something outside of the dialog box. You may have to type or paste very carefully into this text box to avoid "extra" data in your formulas.

Create your line chart as you normally would if you have not already. Now, you need to tell the chart to use our dynamic range instead of the entire table. Click on the chart to activate the Chart Tools contextual tabs.

Now your chart will only show the last 12 rows of data.

When you update your data by adding more rows, the chart will automatically show the new last 12 rows of data, creating a rolling chart effect.

Note that if you want to show more than one series of data on your chart, you will need to create a named range and repeat the above process for each series! This might take you a little more time to set your charts up, but will save you much more in the long run as you simply add to your data and the chart does the rest.

Once you have specified named items in your workbook, you may want to go back and edit them from time to time. Perhaps you want to change your OFFSET to show 6 months instead of 12, for example. To edit an existing name, click the Name Manager button on the Formulas tab. Select the name you wish to edit, then click the Edit button. Make your changes in the dialog box as you did when first creating it. Just be careful not to change the name itself if other formulas depend on it.
OPTIONAL: To check your work and compare named ranges, you can download Excel Rolling Chart_Complete.xlsx.
The OFFSET function is the most common way to build a dynamic named range, but it is not the only option. Depending on your situation, one of these alternatives may work better.
Both methods produce a dynamic chart range that updates automatically. Choose the one that best fits your workbook size and reporting needs.
If your dynamic named range is not behaving as expected, check for these common problems: