Fixing a chart data range

Rob65

New Member
Joined
Apr 23, 2017
Messages
18
Hi All,

I have what is probably a simple problem but can't see a quick fix.

I have a number of charts that feed of data in other tabs. The top row of the data tabs represent dates. Periodically I need to update these sheets and have some VBA code that does this. When the update runs, part of the process loops through the date headers and inserts columns where data values are missing from the series sequence.

The problem occurs because the inserted columns become an explicit part of the charts' data ranges. i.e. if the data range covered columns A through E, inserting a between B and C forces the data range to become A:F. I guess I could go into the charts data range parameters and redefine them, but I wondered if the is an easy way fix the chart's data range in an absolute sense.

Hope this makes sense. Thanks.

Rob
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
when you insert the new column between B and C do you want the chart to be based on the new A:E ?
 
Upvote 0
Hi Yes. I want to keep the data range absolute, regardless of what happens on the data tab. I have made a work around by accessing the chart data range parameters, but was curious to know if there was an easy way to bind the chart to an absolute range.
 
Upvote 0
date01/04/201703/04/201704/04/201705/04/201707/04/201709/04/2017original data01/04/201703/04/201705/04/201707/04/201709/04/2017
value7411869
lower dates generated with offset01/04/201703/04/201705/04/201707/04/201709/04/2017
before new column with 4/4/17 added
01/04/201703/04/201704/04/201705/04/201707/04/2017
741186
now the table above copes with the new column insertion
formula giving 1/4/17
=OFFSET($A$1,0,1)
offset from $A$1 is not affected by the column insertion

<colgroup><col><col span="3"><col><col><col><col><col><col><col><col><col><col span="7"></colgroup><tbody>
</tbody>
 
Upvote 0
Thanks for your reply. The simplest solutions are always the best - I think that should work fine. Much appreciated.
Kind regards,
Rob
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top