View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Baapi[_10_] Baapi[_10_] is offline
external usenet poster
 
Posts: 1
Default Using macro to do same task with different cells


Try this

Sub copypaste1()
Dim K as Integer, I as Integer
For i = 1 To 1520
Do
K = (I + 8) + (6 * (I - 1)) '' k=9,16,23,30
Range(Cells(K,2),Cells(K+6,2)).Select
Selection.Copy
Cells(I+6, 6).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Loop Until i = 1520
Next
End Sub


--
Baapi
------------------------------------------------------------------------
Baapi's Profile: http://www.excelforum.com/member.php...o&userid=27333
View this thread: http://www.excelforum.com/showthread...hreadid=470871