Copying a range

  • Thread starter Thread starter pcor
  • Start date Start date
P

pcor

I want to select a given range and copy that range to 4 places:
Lets say I select a1 to e8
I want the macro to copy the selected information 4 times as
follows:
to a9:e16
a17:e24
a25: e32
F1:J8
In other words. Copy the selected data three times just below the
selected data and once to the right of the selected data.
Most appreciated and Merry Xmas to all
Ian M
 
This macro assume that the column right to the selection is empty, the
same goes for the rows below the selection:

Sub CopyRng()
Dim TargetRng As Range
Set TargetRng = Selection
TargetRng.Copy TargetRng.End(xlToRight).Offset(0, 1)
For r = 1 To 3
TargetRng.Copy TargetRng(1, 1).End(xlDown).Offset(1)
Next
End Sub

Regards,
Per
 
Back
Top