Use VBA to paste 6 cells of data into blank rows on another sheet.

RLloyd

New Member
Joined
Aug 14, 2008
Messages
47
I have a sheet ("Milestones") with 5400 rows of data across dozens of columns. I already have VBA code that will add 3 blank rows below each original row of data. Now I need to paste into 2J-4K, 6J-8K, etc., of the new blank rows in the Milestones sheet, 6 cells of data that reside in Sheet "Work" A1-B3

1 original data
2 Blank
3 Blank
4 Blank
5 original data
6 Blank
7 Blank
8 Blank
9 original data
.
.
.
21,600

Thank you! This project will recur every 6 months, so VBA is the practical method.

R Lloyd
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Code:
sub test()
  dim i as long
application.screenupdating=false
with sheets("Milestones")
  for i = 1 to .cells(.rows.count, "A").end(xlup).row step 4
    sheets("Work").range("A1:B3").copy .cells(i+1,"J")
  next i
end with
application.screenupdating=true
end sub

This code shall do the work (not too quick though).
But you do this just twice a year, so may be there is no need for optimization :-)
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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