vba change just the source sheet for multiple charts
Hi, I have many charts on a worksheet; the source data are on another sheet. I have a second data sheet with similar data; I want to copy all the charts to a second chart sheet, and have the charts refer to the second data sheet. All the source data ranges would stay the same; just the sheet would change. How to edit with VBA the source sheet for all of these copied charts?
I've tried this with macro-recording while I manually make the changes. This results in SetSourceData. I have tried to loop this in VBA but I don't see how to change the sheet but keep the source ranges as they are (it's different for each chart).
Any ideas? Thanks!
Hi, I have many charts on a worksheet; the source data are on another sheet. I have a second data sheet with similar data; I want to copy all the charts to a second chart sheet, and have the charts refer to the second data sheet. All the source data ranges would stay the same; just the sheet would change. How to edit with VBA the source sheet for all of these copied charts?
I've tried this with macro-recording while I manually make the changes. This results in SetSourceData. I have tried to loop this in VBA but I don't see how to change the sheet but keep the source ranges as they are (it's different for each chart).
Any ideas? Thanks!
Last edited: