+ Reply to Thread
Results 1 to 9 of 9

Separating a documents worksheets into individual documents

  1. #1
    Registered User
    Join Date
    04-28-2011
    Location
    Oshkosh, Wi
    MS-Off Ver
    Excel 2007
    Posts
    30

    Separating a documents worksheets into individual documents

    I have was given a document with 87 worksheets . Each worksheet needs to become individual document.

    Does anyone have a quick way to do this?

    Perhaps also separating each file into the 87 already created folders of the same name as the worksheet. I've got to put them in their respective locations. This doesn't take long manually, so it's a low priority.
    Last edited by CWinkler; 09-28-2011 at 01:10 PM.

  2. #2
    Registered User
    Join Date
    04-28-2011
    Location
    Oshkosh, Wi
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Separating a documents worksheets into individual documents

    Wow, I really need to proofread the subject line before I submit.

    EDIT: refering to the subject of this post. "Separating a documents worksheets into individual documents" almost engrish.
    Last edited by CWinkler; 09-28-2011 at 12:17 PM. Reason: see above.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Separating a documents worksheets into individual documents

    Hi CWinkler

    I just looked at your Thread...what have you discovered?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Separating a documents worksheets into individual documents

    Quick and dirty... will save each worksheet to a separate file.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Separating a documents worksheets into individual documents

    Hi CWinkler

    This is relatively easy
    Each worksheet needs to become individual document
    dangelor has suggested code to do the same. However, the code does not check for this
    already created folders of the same name as the worksheet
    So, I'll ask again
    Wow, I really need to proofread the subject line before I submit.
    what have you discovered?

  6. #6
    Registered User
    Join Date
    04-28-2011
    Location
    Oshkosh, Wi
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Separating a documents worksheets into individual documents

    Quote Originally Posted by dangelor View Post
    Quick and dirty... will save each worksheet to a separate file.
    Please Login or Register  to view this content.
    Oh yes, I did find that same code. And it works, but unfortunately, I'd like to append that worksheet filename with a specific path and text.

    IE. save as "Folder/Some Text Worksheet Name.xlsx"
    Last edited by CWinkler; 09-28-2011 at 01:10 PM. Reason: spelling

  7. #7
    Registered User
    Join Date
    04-28-2011
    Location
    Oshkosh, Wi
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Separating a documents worksheets into individual documents

    And actually, the code above doesn't work. It basically copies the entire workbook and saves it as the worksheet name active in the FOR loop.

    I did figure out that the string inside the parenthesis requires the "+" operator and not the "&" operator, Which is frustrating. IE: ws.SaveAs (ws.Name + "more text")

    Why isn't it just saving that particular worksheet?
    Last edited by CWinkler; 09-28-2011 at 10:57 AM.

  8. #8
    Registered User
    Join Date
    04-28-2011
    Location
    Oshkosh, Wi
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Separating a documents worksheets into individual documents

    Took a new approach.

    Gathered the basic code from this post
    http://www.ozgrid.com/forum/showthread.php?t=53353

    Please Login or Register  to view this content.
    The folders already exist so I don't need to check for them or create them, so that simplified things.
    Last edited by CWinkler; 09-28-2011 at 01:18 PM. Reason: code goof.

  9. #9
    Registered User
    Join Date
    02-07-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Separating a documents worksheets into individual documents

    I have an excel file with 31 separately named worksheets (tabs?) and would like to separate them into 31 individual excel files - with the same name as the worksheet.

    If anyone has VBA code that does this, I'd be interested. As well, please specify how to run and where to run it from.

    thanks for any assistance I can get on this. If/when I learn how, I have many applications I will use this on.

    Steve

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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