INSERT ROW DATA INTO EVERY SECOND ROW [Solved/Closed]

MadLooni 1 Posts Thursday May 16, 2013Registration date May 16, 2013 Last seen - May 16, 2013 at 06:18 AM - Latest reply: TrowaD 2433 Posts Sunday September 12, 2010Registration dateContributorStatus September 17, 2018 Last seen
- May 16, 2013 at 11:01 AM
Hi

I have an excel sheet with blank rows every odd line (i.e rows 2,4,6,8...700 are empty). I have to paste a row of data (the same all the way through) into each of these blank rows. So I have paste the same data in every blank row (odd rows) from A1 - H1.

Would appreciate any expert's help!


thanks
See more 

1 reply

Best answer
TrowaD 2433 Posts Sunday September 12, 2010Registration dateContributorStatus September 17, 2018 Last seen - May 16, 2013 at 11:01 AM
5
Thank you
Hi MadLooni,

The following code will copy the data from A1:H1 and will paste it to every odd row until row 699:

Sub FillInOddRows()
Dim x As Integer
Range("A1:H1").Copy
x = 1
    Do
        x = x + 2
        Range("A" & x).PasteSpecial
    Loop Until x = 699
Application.CutCopyMode = False
End Sub

Best regards,
Trowa

Thank you, TrowaD 5

Something to say? Add comment

CCM has helped 1813 users this month