VBA code for copy & paste items for multiple times

Solved/Closed
andrewhu91 Posts 3 Registration date Thursday June 28, 2018 Status Member Last seen July 3, 2018 - Updated on Jul 9, 2018 at 06:35 AM
andrewhu91 Posts 3 Registration date Thursday June 28, 2018 Status Member Last seen July 3, 2018 - Jul 3, 2018 at 12:11 PM
Hi, I'm a very beginner in VBA and would need this problem solved urgently. I'd like to copy each line item and paste them in a new sheet 9 times. I tried several codes but it just messed up. The first figure is the raw data and the second figure is intended output. I'd need to copy and paste all line items 9 times. If you could show me some codes, I'd like to try them out.

Thank you so much, and I really look forward to hearing from you soon.



1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Jun 28, 2018 at 11:01 AM
Hi Andrew,

Why not copy C2:F479. Then on the other sheet hit:
- Ctrl+v
- End
- Arrow down
- Arrow down
repeat 8 more times.

Then select column C:F and sort on column F.

Best regards,
Trowa
1
andrewhu91 Posts 3 Registration date Thursday June 28, 2018 Status Member Last seen July 3, 2018
Updated on Jun 28, 2018 at 11:14 PM
Thank you Trowa.. That helps a lot! easier also. would you also mind letting me know the VBA code if not too much work?
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Jul 3, 2018 at 12:06 PM
Hi Andrew,

Thanks for the feedback. I haven't had the time for the VBA code as I prioritise new query's.
Do take a look at the link below as it does pretty much the same thing; repeating a number of rows:
https://ccm.net/forum/affich-1052135-copying-time-fields-down#p1052306

Let me know if you are still waiting for a code tailored for your situation.

Best regards,
Trowa
0
andrewhu91 Posts 3 Registration date Thursday June 28, 2018 Status Member Last seen July 3, 2018
Jul 3, 2018 at 12:11 PM
It worked. Thanks so much for help.
0