clif
04-22-2012, 08:02 PM
Why the below code is not work? Thank you very much!
Sub Macro18()
Dim a As Integer
Dim ba As Integer
For a = 0 To 30
b = a + 3
Sheets("Apr").Select
Range("Cells(37,b),Cells(56,b)").Select
Selection.Copy
Sheets("abc").Select
Cells(2 + a, 20).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Next a
End Sub
Sub Macro18()
Dim a As Integer
Dim ba As Integer
For a = 0 To 30
b = a + 3
Sheets("Apr").Select
Range("Cells(37,b),Cells(56,b)").Select
Selection.Copy
Sheets("abc").Select
Cells(2 + a, 20).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Next a
End Sub