S
Sören_Marodören
I have a VBA-program that I wants to loop through several collumns of data
and plot this data in different graphs.
When I record a macro, where I select the three collums of interest and
generate a graph, the result looks like this.
Range("A:A,D,K:K").Select
Range("K1").Activate
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SetSourceData
Source:=Sheets("PEc_measdata20070907_0833").Range( _
"A1:A3501,D13501,K1:K3501"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:= _
"PEc_measdata20070907_0833"
How can I change the code so that I in the firs turn plots column A, B and
I. The next turn A, C and J, then A, D and K, then A, E and L, then A, F and
M, and finaly A, G and N.
At the same time the lengt of data can vary. Therfore I have a variable
called No_of_Data. In the example above this variable shuld be 3501. How can
I include this in my program.
BR,
/Sören
and plot this data in different graphs.
When I record a macro, where I select the three collums of interest and
generate a graph, the result looks like this.
Range("A:A,D,K:K").Select
Range("K1").Activate
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SetSourceData
Source:=Sheets("PEc_measdata20070907_0833").Range( _
"A1:A3501,D13501,K1:K3501"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:= _
"PEc_measdata20070907_0833"
How can I change the code so that I in the firs turn plots column A, B and
I. The next turn A, C and J, then A, D and K, then A, E and L, then A, F and
M, and finaly A, G and N.
At the same time the lengt of data can vary. Therfore I have a variable
called No_of_Data. In the example above this variable shuld be 3501. How can
I include this in my program.
BR,
/Sören