How to copy a range in sequence

kyg

New Member
Joined
Aug 29, 2024
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Hi I have a range of data in a table from B3 to B40. I'm trying to write a macro to copy the range in rows of 4 and paste it to another application in sequential manner till the last row is done. ie B3 to B6 follow by B7 to B10 and so on. Do I have to use a loop?

Appreciate the help here. Thanks in advance
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
VBA Code:
Sub CopyData()

  Dim i As Long
  i = 3
 
  With Sheet1
 
      Do While .Range("B" & i) <> ""
        .Range("B" & i).Resize(4).Copy Destination:="Add your Destination Here"
        
        i = i + 4
      Loop
 
  End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top