L
Li Chen
Hi all,
Here is an off -Ruby topic. Recently I need to do a lot of work in Excel
with repeated work. And macro might be some help.
I wonder how I can loop some ranges of cells using a for loop in
Excel.
Thanks,
Li
For i =0 To 4 Step 1
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Range("A11,A22")
MsgBox i
Next
###############################
after each step the following line should change as follows:
Range("A11,A22")
Range("A11,A33")
Range("A11,A44")
.....
Here is an off -Ruby topic. Recently I need to do a lot of work in Excel
with repeated work. And macro might be some help.
I wonder how I can loop some ranges of cells using a for loop in
Excel.
Thanks,
Li
For i =0 To 4 Step 1
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Range("A11,A22")
MsgBox i
Next
###############################
after each step the following line should change as follows:
Range("A11,A22")
Range("A11,A33")
Range("A11,A44")
.....