prashant230182
New Member
- Joined
- Sep 16, 2022
- Messages
- 2
- Office Version
- 2021
- Platform
- Windows
In Excel VBA - Copy one DataSet of 8 rows and Paste is same excel N number or times. I have data set of 8 rows and 5 Columns
Requirement
Copy data set of 8 rows once and paste N number of times with respect to project requirement.
I am using below code and able to paste is once, but not able to past same data set N number of times based on my requirement
ActiveSheet.UsedRange.Offset(1, 0).Copy
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
I tired Looping too
For Row = 1 To 2
ActiveSheet.UsedRange.Offset(1, 0).Copy
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
Next Row
but not working with above logic data set paste 3 times but still with N number times its failing
I want below data set to be paste N number of time in loop based on my req*
Requirement
Copy data set of 8 rows once and paste N number of times with respect to project requirement.
I am using below code and able to paste is once, but not able to past same data set N number of times based on my requirement
ActiveSheet.UsedRange.Offset(1, 0).Copy
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
I tired Looping too
For Row = 1 To 2
ActiveSheet.UsedRange.Offset(1, 0).Copy
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
Next Row
but not working with above logic data set paste 3 times but still with N number times its failing
I want below data set to be paste N number of time in loop based on my req*