Copy and manipulate a chart with VBA

mountainman88

Board Regular
Joined
Jun 22, 2019
Messages
109
Office Version
  1. 2016
Platform
  1. Windows
I have a group ("Group 1") which is a chart ("Chart 1") grouped with a text box ("TextBox 1")

The top left corner of Group 1 is aligned with the top left corner of cell K1
TextBox 1 is linked to cell C23
Chart 1 is linked to data in the range B6:C18
VBA will make Chart 1's vertical axis lower bound = C24
Once the vertical axis is linked then Group 1 is finalized

I then need the group copied 11 times each 33 rows lower than the one before, with the relative references also moving by 33 rows.

For example the first copy would go as follows:

Copy Group 1 and paste as Group 2 which is comprised of Chart 2 and TextBox 2

The top left of Group 2 will be aligned with the top left of cell K34
TextBox 2 is linked to cell C56
Chart 2 is linked to data in the range B39:C51
Chart 2's vertical axis lower bound = C57

then every 33 rows Group 3, Group 4......etc etc....until Group 11

Thanks!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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