Hello All,
I have a decent attempt at some code that I was able to glean from a forum or two but I am having a memory issues due to the size of my population. Essentially what I need to do, is take one large worksheet and split it to many worksheets (while keeping the same format for the header row) based on unique variables found in a name field (about 150 unique variables). This code works great but then bombs due to insufficient resources at around the 10th worksheet.
Rather than continue creating worksheets out to 150 (which I lack enough memory for anyway), I'm thinking the best bet would be to create & populate the new sheet for a unique variable, save that newly created sheet to a folder on my C Drive (which will be needed for a mail merge), delete the contents of the sheet in the macro file but not delete the sheet itself (as I think the code looks for that name before moving on), and then let the loop continue to run.
By the time I am finished, I should have around 1 base data table, 150 empty "named" worksheets, and 150 populated saved files on my hard drive.
The code I have now lacks:
1. Retention of header row formatting
2. The sheet saving and subsequent contents clearing procedure
Finally, sample spreadsheet is attached. The forums assistance is very much appreciated as I have literally been beating my head against this wall for about 5 hours.
Thank you in advance!
Bookmarks