Excel - Repeat Last row into N number of times
Closed
Abu.hamna
Posts
1
Registration date
Tuesday February 28, 2017
Status
Member
Last seen
February 28, 2017
-
Feb 28, 2017 at 08:09 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 28, 2017 at 11:48 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 28, 2017 at 11:48 AM
Related:
- Excel - Repeat Last row into N number of times
- Number to words in excel - Guide
- Saints row 2 cheats - Guide
- Ocarina of time rom - Download - Action and adventure
- Excel marksheet - Guide
- Excel apk for pc - Download - Spreadsheets
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Feb 28, 2017 at 11:48 AM
Feb 28, 2017 at 11:48 AM
Hi Abu,
You didn't mentioned where the number N can be found, so I let Excel ask you.
Here is the code:
Best regards,
Trowa
You didn't mentioned where the number N can be found, so I let Excel ask you.
Here is the code:
Sub RunMe() Dim x, N As Integer N = InputBox("How many times do you want to repeat the last row?:") x = Range("A1").End(xlDown).Row Do Until N = 0 Rows(x).Copy Range("A" & Rows.Count).End(xlUp).Offset(1, 0) N = N - 1 Loop End Sub
Best regards,
Trowa