Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all,
I'm trying to change the formulae in many line charts by adding four points to each chart, i.e. the old range goes through to column "Z", the new range is supposed to go through to column "AD". Whenever I do this, the third series gets the data from the first series (subsequent series are ok again), and I have no clue, why that might be the case. Any ideas? Regards, Ulrike Code: Sub makelonger() For i = 12 To 19 For j = 1 To Worksheets(i).ChartObjects.Count anz = Worksheets(i).ChartObjects (j).Chart.SeriesCollection.Count For k = 1 To anz titel = Worksheets(i).ChartObjects (j).Chart.Name On Error GoTo naechste formel = Worksheets(i).ChartObjects(j).Chart.SeriesCollecti on (k).Formula formelneu = formel If InStr(formel, "Z") 0 Then _ formelneu = Left(formel, InStr (formel, ":$Z")) & "$AD" & _ Right(formel, Len(formel) - InStr (formel, "Z")) If InStr(formelneu, "Z") 0 Then _ formelneu = Left(formelneu, InStr (formelneu, ":$Z")) & "$AD" & _ Right(formelneu, Len(formelneu) - InStr (formelneu, "Z")) Worksheets(i).ChartObjects (j).Chart.SeriesCollection(k).Formula = formelneu naechste: Next k Next j Next i End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic Charts - Changing Number of Series | Charts and Charting in Excel | |||
Changing a data series in a graph from a line to a bar | Excel Discussion (Misc queries) | |||
Changing order of series in line-column chart | Charts and Charting in Excel | |||
Change data Series from a bar to a line after changing axis | Charts and Charting in Excel | |||
Changing a charts series order | Charts and Charting in Excel |