ich möchte aus einem File mit 360000 Zeilen die Daten immer Blockweise in einzelne Digramme plotten. Und zwar in folgender Art und Weise:
Zeile 0-6000 --> Diagramm 1
Zeile 6001 - 12000 --> Diagramm 2
Zeile 12001 - 18000 --> Diagramm 3
Mit folgendem Code habe ich das für die ersten beiden Blöcke auch schon hinbekommen. Das ganze jetzt aber insgesamt 120 mal hintereinander zu schreiben scheint mir nicht sehr sinnvoll. Das lässt sich doch bestimmt über eine Schleife lösen. Hab schon lange rum probiert, komme aber auf keinen grünen Zweig. Ich hoffe ihr könnt mir helfen.
Hier mal der Code für die ersten beiden Blöcke:
ActiveSheet.Shapes.AddChart2(240, xlXYScatterSmoothNoMarkers).Select
ActiveChart.SetSourceData Source:=Range( _
"'Raw Data'!$A$1:$A$6000,'Raw Data'!$H$1:$O$6000" _
)
ActiveChart.Axes(xlCategory).Select
ActiveChart.Axes(xlCategory).MinimumScale = 0
ActiveChart.Axes(xlCategory).MaximumScale = 6000
ActiveChart.Axes(xlValue).MinimumScale = 0
ActiveChart.Axes(xlValue).MaximumScale = 0.5
ActiveChart.SetElement (msoElementLegendBottom)
ActiveSheet.Shapes.AddChart2(240, xlXYScatterSmoothNoMarkers).Select
ActiveChart.SetSourceData Source:=Range( _
"'Raw Data'!$A$6001:$A$12000,'Raw Data'!$H$6001:$O$12000" _
)
ActiveChart.Axes(xlCategory).Select
ActiveChart.Axes(xlCategory).MinimumScale = 6000
ActiveChart.Axes(xlCategory).MaximumScale = 12000
ActiveChart.Axes(xlValue).MinimumScale = 0
ActiveChart.Axes(xlValue).MaximumScale = 0.5
ActiveChart.SetElement (msoElementLegendBottom)
ActiveChart.FullSeriesCollection(1).Name = _
"='Raw Data'!$H$1"
ActiveChart.FullSeriesCollection(2).Name = _
"='Raw Data'!$I$1"
ActiveChart.FullSeriesCollection(3).Name = _
"='Raw Data'!$J$1"
ActiveChart.FullSeriesCollection(4).Name = _
"='Raw Data'!$K$1"
ActiveChart.FullSeriesCollection(5).Name = _
"='Raw Data'!$L$1"
ActiveChart.FullSeriesCollection(6).Name = _
"='Raw Data'!$M$1"
ActiveChart.FullSeriesCollection(7).Name = _
"='Raw Data'!$N$1"
ActiveChart.FullSeriesCollection(8).Name = _
"='Raw Data'!$O$1"