I need to create multiple plots from a spreadsheet. Here is what I have
I have a variable, say numseries = K. I have data in columns in the first
K+1 columns and also in columns K+2 to 2K+1 in a spreadsheet. I have N rows.
For ease of writing, I will call them cells(1,1) to Cells(100, 2K+1)
I want to LOOP through so that I create scatter plot for Range(Cells(1,1),
Cells(100,1)) and Range(Cells(1,j+1), Cells(100,j+1)) AS WELL AS
Range(Cells(1,1), Cells(100,1)) and Range(Cells(2,j+1+K),
Cells(100,j+1+K)) in a chart.
I want to loop this for j = 1 to K
I was doing something like:
For i = 1 to K
charts.add
activechart.ChartType = xlXYScatter
ActiveChart.Series.Collection.NewSeries
Activechart.series.collection(1).Xvalues=Range(Cells(1,1), Cells(100,1))
Activechart.series.collection(1).Values=Range(Cells(1,j+1), Cells(100,j+1))
Activechart.series.collection(2).Xvalues=Range(Cells(1,1), Cells(100,1))
Activechart.series.collection(2).Values=Range(Cells(1,j+1+K),
Cells(100,j+1+K))
SOME OTHER CHART STATEMENTS ARE ERASED
Next i
For each of the chart it only plots the values for j=K and not for the
individual series that I thought it should do.