Macro Program for Dual For Loop
'Macro Program for Dual For Loop
Sub Macro2PrintList()
'VBA Code to Print AC, PB List
Dim AC As Integer
Dim I As Integer
Dim K As Integer
K = 2
For I = 2 To 13
For AC = 1 To Cells(I, 2).Value
Cells(K, 5) = Cells(I, 1)
Cells(K, 6) = AC
K = K + 1
Next AC
Next I
End Sub
Sub Macro2PrintList()
'VBA Code to Print AC, PB List
Dim AC As Integer
Dim I As Integer
Dim K As Integer
K = 2
For I = 2 To 13
For AC = 1 To Cells(I, 2).Value
Cells(K, 5) = Cells(I, 1)
Cells(K, 6) = AC
K = K + 1
Next AC
Next I
End Sub
Comments
Post a Comment