Copying a chart in 2010

The Dow Jones

New Member
Joined
Nov 20, 2013
Messages
10
I have multiple tabs in the same format. If I create a chart in one tab, how can I copy it to multiple tabs with the chart source data using the destination. When I copy the chart, when I get to the new tab, it still links to the first one. As I have over 100 tabs, is there an easy way to do this?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi
You could use something like this:

Code:
Sub CopyChart()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets  ' all sheets
    If sh.Name <> "Sheet1" Then         ' source sheet
        Sheets("Sheet1").ChartObjects("Chart 7").Activate   ' template
        ActiveChart.ChartArea.Copy
        sh.Paste
        sh.ChartObjects(sh.ChartObjects.Count).Activate
        ActiveChart.SeriesCollection(1).Values = sh.Range("b30:b34")
        ActiveChart.SeriesCollection(2).Values = sh.Range("c30:c34")
    End If
Next
       
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

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