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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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