Loop to specific rows
Sorry Omar did not mean to leave you hanging. I don't really
understand what you meant, but for your question for me how to make my
code copy... Now I must warn you this is not the best way... well
almost anything but here goes. This macro will copy values from cells
C7 etc to Test.xls to column A so that first value (C7) will go to A2
and D7 in A3 and so on. I asume you will have both original data.xls
and test.xls open and nothing else.
Sub test()
Range("c7").Select
For i = 0 To 10
For j = 0 To 6
ActiveCell.Offset(i * 5, j).Copy
Windows("Test.xls").Activate
Range("A" & 2 + k).Select
Selection.PasteSpecial Paste:=xlValues
ActiveWindow.ActivateNext
k = k + 1
Next j
Next i
End Sub
hope this helps
|