Hi all,
I have proudly created my first macro (albeit using the Record feature in Excel).
I have a master data with about 100,000 rows of data and about 50 columns.
The master data sheet contains account information and related owners. The objective is to split this data by batches and send out these details out. However there are around 4,000 batches, each batch can have 1 or more account. On the master I am giving them a batch no 100, 101, 102 etc.
I manually filter by batch and copy/paste relevant columns into new template, and repeat until we have created files for each of the batches. I created a macro and successfully copies/pastes into new template file and saves. However I now wish to add something to allow the batch to autoloop until all batches 1-4000 have been created and saved until there are no more matches. A simple google search has shown the code is not too long but there are so many different examples I am confused as to what would be best to use. The batch no is in Col A.
Can someone assist me with a sample code that would repeat until there are no more batches left. If my understanding is correct I would just need to add this to beginning of my existing code. Thanks in advance, any questions please ask.
I have proudly created my first macro (albeit using the Record feature in Excel).
I have a master data with about 100,000 rows of data and about 50 columns.
The master data sheet contains account information and related owners. The objective is to split this data by batches and send out these details out. However there are around 4,000 batches, each batch can have 1 or more account. On the master I am giving them a batch no 100, 101, 102 etc.
I manually filter by batch and copy/paste relevant columns into new template, and repeat until we have created files for each of the batches. I created a macro and successfully copies/pastes into new template file and saves. However I now wish to add something to allow the batch to autoloop until all batches 1-4000 have been created and saved until there are no more matches. A simple google search has shown the code is not too long but there are so many different examples I am confused as to what would be best to use. The batch no is in Col A.
Can someone assist me with a sample code that would repeat until there are no more batches left. If my understanding is correct I would just need to add this to beginning of my existing code. Thanks in advance, any questions please ask.