+ Reply to Thread
Results 1 to 5 of 5

Split worksheets in multiple workbooks in folder

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    VA
    MS-Off Ver
    Excel 2007
    Posts
    20

    Split worksheets in multiple workbooks in folder

    I have about 400 Excel workbooks in a folder, all of which have 1 sheet of data. I have been searching for the VB code which will split the worksheet by column Y into separate sheets. I have found the code which will perform this as well as code which is intended to run the same code on ALL workbooks in a folder. I've tried putting the two sets of code together, but it keeps running the code for the active sheet only. How can I get this to run on all workbooks in a folder?

    Please Login or Register  to view this content.
    Last edited by Eric09; 09-07-2012 at 10:05 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Split worksheets in multiple workbooks in folder

    Quote Originally Posted by Eric09 View Post
    I have about 400 Excel workbooks in a folder, all of which have 1 sheet of data. I have been searching for the VB code which will split the worksheet by column Y into separate sheets.
    Can you explain better ? do you want extract each column save as new sheet ?
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    09-07-2012
    Location
    VA
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Split worksheets in multiple workbooks in folder

    I want to split all 400 workbooks by the value in column Y, 1 sheet for each value. I got this to work for one workbook with this code:

    Please Login or Register  to view this content.
    I was able to delete the original sheet and the other two default sheets, so that I would end up with only the sheets produced with the code above. Again, I want to loop this function through all 400 as well.

    Please Login or Register  to view this content.
    Now I want to it to loop through 400 workbooks in a folder, and perform these two functions. All workbooks have the same columns and structure, just different names and data.

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Split worksheets in multiple workbooks in folder

    to open all files in a folder and change them
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-07-2012
    Location
    VA
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Split worksheets in multiple workbooks in folder

    That did it. Thanks!

+ 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