Hello,
I am trying to use loop to change all chart's xvalues , series etc.
Problem is when i use Range
Code works fine, but I cannot use loop like this ( I need to add +10column for each loop )
I try to use Cells instead, but I get error, I guess I do something wrong.
Same problem with XValues , need to use Cells instead of E3:E53
Can anyone help please?
I am trying to use loop to change all chart's xvalues , series etc.
Problem is when i use Range
VBA Code:
ActiveChart.SetSourceData Source:=sh.Range("E2:O53"), PlotBy:=xlColumns
I try to use Cells instead, but I get error, I guess I do something wrong.
Code:
ActiveChart.SetSourceData Range(Cells(2, 5), Cells(lr, 5 + lc).Value), xlColumns
Same problem with XValues , need to use Cells instead of E3:E53
Code:
ActiveChart.SeriesCollection(i).XValues = "='" & ActiveSheet.Name & "'!" & Range("E3:E53").Address
Can anyone help please?