Loop Copy Rows, Paste in next available row given a value in a cell

Craddox

New Member
Joined
Feb 13, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi, This is my first time posting (many times reading).

I have a workbook at can have variable numbers of rows submitted (up to 200k) but copy and pasting formula in each possible cell in 200k rows is swamping my PC memory. The likelihood of 200k rows is very small (usually more like 10k) so killing the workbook for a slim eventuality seems pointless. I have set up a count of how many rows are "actually" submitted and need a VBA code to copy and paste a row of data (formula) against the count stated in a cell and to loop until the cell number has been met.

If anyone can help it would be much appreciated. I've been trying to stitch together pieces of code but not getting very far.

Many thanks
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi, when more than 65k rows the better is to avoid Excel and use a Database software …​
Did you try to use an Excel table ? (so no need to copy anything, all is automatic)​
 
Upvote 0
Hi, when more than 65k rows the better is to avoid Excel and use a Database software …​
Did you try to use an Excel table ? (so no need to copy anything, all is automatic)​
Hi Marc,

Access is my next stop but the coding is critical so trying to generate in excel initially before paying someone to migrate it to SQL with an access front end plus we need something working initially as a stopgap. I've had bad experiences of pivot tables in excel (not copying things etc) so I try to keep away from them especially when there's a lot of data as it's impossible to sanity check them. I'll take another look at pivot tables as an interim solution unless anyone con come up with some VBA code. Thanks
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top