Closed Thread
Results 1 to 4 of 4

Excel worksheet splitting into multiple worksheets with folder save

  1. #1
    Registered User
    Join Date
    04-28-2014
    Location
    48483385
    MS-Off Ver
    Excel 2010
    Posts
    3

    Excel worksheet splitting into multiple worksheets with folder save

    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!

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by utechtj; 04-28-2014 at 09:27 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Excel worksheet splitting into multiple worksheets with folder save

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-28-2014
    Location
    48483385
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Excel worksheet splitting into multiple worksheets with folder save

    My apologies for not following the forum rules. I will be more mindful in the future. Also, thank you for assisting me with the code tags.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel worksheet splitting into multiple worksheets with folder save

    Thread closed as Op asked for(Wants to post in Commercial Services Sub Forum).
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] splitting worksheet into multiple worksheets
    By mmdecarl in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-17-2013, 02:35 PM
  2. [SOLVED] Loop through multiple files, run macro, then save as Excel workbook in a different folder
    By Peter Kallio in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-26-2013, 11:42 PM
  3. Splitting 2K worksheet into multiple worksheets
    By abmayfield in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2012, 04:28 PM
  4. [SOLVED] VBA to save multiple worksheets as separate CSV files using name of worksheet
    By Yg74 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 10:55 AM
  5. VBA to save multiple worksheets as separate CSV files using name of worksheet
    By titushanke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 08:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1