Need Macro- Copy Row and Insert 10 times
Solved/Closed
nycm
Posts
6
Registration date
Monday October 28, 2013
Status
Member
Last seen
October 31, 2013
-
Oct 28, 2013 at 02:19 PM
nycm Posts 6 Registration date Monday October 28, 2013 Status Member Last seen October 31, 2013 - Oct 29, 2013 at 09:41 AM
nycm Posts 6 Registration date Monday October 28, 2013 Status Member Last seen October 31, 2013 - Oct 29, 2013 at 09:41 AM
Related:
- Need Macro- Copy Row and Insert 10 times
- Saints row 2 cheats - Guide
- Insert check mark in word - Guide
- Times attack - Download - Children
- How to insert photo in word for resume - Guide
- Insert draft watermark in word on all pages - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 28, 2013 at 11:06 PM
Oct 28, 2013 at 11:06 PM
data is like this in sheet1 from A1
hdng1 hdng2 hdng3
TextA TextA1 TextA2
TextB TextB1 TextB2
TextC TextC1 TextC2
now try this macro
in the macro there is a statement
j=10
that is the rows in sheet1 will be copied 10 times. if you want different number modifgy this statement
result in sheet 3
hdng1 hdng2 hdng3
TextA TextA1 TextA2
TextB TextB1 TextB2
TextC TextC1 TextC2
now try this macro
in the macro there is a statement
j=10
that is the rows in sheet1 will be copied 10 times. if you want different number modifgy this statement
result in sheet 3
Sub test()
Dim j As Integer, r As Range, c As Range, r1 As Range, r2 As Range
j = 10
Application.ScreenUpdating = False
Worksheets("sheet3").Cells.Clear
Set r = Range(Range("A2"), Range("A2").End(xlDown))
For Each c In r
Range(c, c.End(xlToRight)).Copy
With Worksheets("sheet3")
Set r1 = .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
.Range(r1, r1.Offset(j - 1, 0)).PasteSpecial
End With
Next c
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
nycm
Posts
6
Registration date
Monday October 28, 2013
Status
Member
Last seen
October 31, 2013
Oct 29, 2013 at 09:41 AM
Oct 29, 2013 at 09:41 AM
Hi Venkat1926,
It worked first try! Thank you so much for your help!
It worked first try! Thank you so much for your help!