I am running a loop in VBA which is supposed to draw a new chart for every (2) column(s) of data.
However, I am not sure how to make it "jump" from column to column.
Part of my program (does not include the "For i=1 to3 e.t.c.) is below. The high-lighted part is the part I am trying to change. Instead of a fixed reference I wanted to get the data I have in the underlined part. Any suggestions???
Sheets("OUTPUT All data").Select
Range(Cells(11, 2 * i), Cells(11, 2 * i + 1)).Select Range(Selection, Selection.End(xlDown)).Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("OUTPUT All data").Range(Cells(11, 2 * i), Cells(11, 2 * i + 1)).Select
Range(Selection, Selection.End(xlDown)).Select_ , PlotBy:=xlColumns
'ActiveChart.SetSourceData Source:=Sheets("OUTPUT All data").Range("B11:C316") _ , PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet
ActiveChart.HasLegend = True
ActiveChart.Legend.Select
Selection.Position = xlTop
ActiveChart.ChartArea.Select
Selection.AutoScaleFont = True
Bookmarks