PDA

View Full Version : Dynamically Update Chart With Latest X Columns Of Data As New Data Is Updated



larryt1940
07-18-2014, 06:56 PM
I have a set of charts (10) that rely on new data each week.

Each chart uses the latest 12 columns of data and the range does not grow dynamically.

It is always the latest 12 columns of data.

The data range is a moving 12 columns of data, i.e. moving to the right with the addition of a new column of data each week.

The current week's data range (12 weeks of data) is:

=SERIES(Data!$D$13,Data!$DK$4:$DV$4,Data!$DK$80:$D V$80,1)

Next week's data range (12 weeks of data) will be:

=SERIES(Data!$D$13,Data!$DL$4:$DW$4,Data!$DL$80:$D W$80,1)

From the above example, the data is populated in columns in the worksheet by adding a new column of data each week.

The new column is added after the last populated column.

I need some code that will update the moving data range (12 columns only) so the charts will automatically update
and refresh.

Thanks

larryt1940
07-19-2014, 04:54 AM
Would this work?

If I used "offset" to define my chart data range and delete the reference column each week, containing data to the left of my range that I no longer need.

Would the range advance and update automatically, given that is is defined by the number of columns to the right of the reference cell?

Excel Fox
07-21-2014, 06:49 AM
Can be done with a few simple formulas and named ranges. Here's a sample. Post back if you need clarity on how to use it.

Admin
07-21-2014, 07:35 AM
That would work. But be careful, deleting columns may cause some REF error. So better would be hiding those columns.

larryt1940
07-21-2014, 08:01 AM
That would work. But be careful, deleting columns may cause some REF error. So better would be hiding those columns.

Thank you! I will try that when I get to the office tomorrow.

Will let you know the results.

Larry T

larryt1940
07-21-2014, 08:08 AM
Can be done with a few simple formulas and named ranges. Here's a sample. Post back if you need clarity on how to use it.

Excel Fox, Thank you. Looking at the code, I believe this will work. Will try it with the charts tomorrow.