Get Excel Chart to Change on Multiple Worksheets

Sherifa

New Member
Joined
Oct 23, 2017
Messages
45
I have created two charts in my source worksheet Sheet4, but I want to adjust the range for 42 worksheets.
I'm less than a week old to Bloomberg, so didn't know the best way.
The data positioning is the same for all the worksheets.
I've added secondary axis etc, so want the copy and paste to be able to adjust to each worksheets data.
How can I go about this?

I've tried to add the range, but don't know what you meant or how to fill chart with actual values (rather binding it to sheet's range)

Code:
Sub SetSourceData()Dim Wkb As Excel.Workbook
Dim ws As Worksheet


 
 Set Wkb = ThisWorkbook
        ws_count = Wkb.Worksheets.Count
                
                     
        'Begin loop
        For i = 3 To ws_count
        
        Set TargetSheet = Wkb.Worksheets(i)
        
      Charts("AllDeals").SetSourceData Source:=Wkb.Worksheets(i).Range("q3:t14"), _
        PlotBy:=xlColumns
 
 
 Next
 
End Sub
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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