+ Reply to Thread
Results 1 to 15 of 15

Copy specific sheets of multiple closed workbooks to new workbook

  1. #1
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Copy specific sheets of multiple closed workbooks to new workbook

    First of all hello everyone, this is my first post
    As shown in the main folder , I have containing Many of the closed workbooks each have several worksheets, I only need to create new workbook which names contains the sheets August & September, I tried doing myself but so far I haven't found an online video/tutorial About achieving that If possible I need flexible way without opening the workbooks .. Please see the attachment files ...Thanks a lot for your help.
    Attached Files Attached Files
    Last edited by JACK JOUSH; 12-12-2020 at 05:52 PM.

  2. #2
    Forum Contributor
    Join Date
    10-23-2015
    Location
    egypt
    MS-Off Ver
    2010
    Posts
    246

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    try this
    Please Login or Register  to view this content.
    Kind Regards
    Attached Files Attached Files
    Last edited by salmasaied; 12-12-2020 at 05:54 PM.

  3. #3
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    Thanks a lot for your reply
    In fact your solution is very excellent, But it didn't work fast with a lot of workbooks, Is there any alternative approach to speed this up?
    Any help would be greatly appreciated!!! - thanks in advance...
    Last edited by JACK JOUSH; 12-12-2020 at 05:51 PM.

  4. #4
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    Any help would be greatly appreciated!!! - thanks in advance...
    Last edited by JACK JOUSH; 12-12-2020 at 05:51 PM.

  5. #5
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    I thank everyone who is able to give me some of your time to help me, I appreciate it very much.
    Last edited by JACK JOUSH; 12-12-2020 at 05:50 PM.

  6. #6
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    Is there any chance for helping me in this topic please?
    Happy vacation, everyone

  7. #7
    Registered User
    Join Date
    12-06-2020
    Location
    Forl', Italy
    MS-Off Ver
    Office 2019
    Posts
    20

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    3 Seconds im my PC!
    Need for all 12 month? Simply change For i = 8 To 9 to For i = 1 To 12

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-06-2020
    Location
    Forl', Italy
    MS-Off Ver
    Office 2019
    Posts
    20

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    3 Seconds im my PC!
    Need for all 12 month? Simply change For i = 8 To 9 to For i = 1 To 12

    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    Quote Originally Posted by JACK JOUSH View Post
    I have containing Many of the closed workbooks each have several worksheets, I only need to create new workbook which names contains the sheets August & September, ...
    Try
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    That's wonderful .. I am so grateful for you Mr. jindon You are wonderful and I liked your approach in coding
    I will come back to you later, Regards

  11. #11
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    In fact Mr jindon It is greater than I imagined and is a wonderful surprise for me.
    I have one extra point to complete this wonderful treasure The point is I need to sort the names alphabetically depending on the column F
    In both of the two sheets ( August & September ). Hope this makes sense. Regards

  12. #12
    Registered User
    Join Date
    12-06-2020
    Location
    Forl', Italy
    MS-Off Ver
    Office 2019
    Posts
    20

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    @jindon

    Well, in fact my code work for month 8 and 9.
    Can be modified for 12 month only modifying For...Next 8 to 9 into 1 to 12.
    Certainly OP spoke of only two months but his master Workbook, like the five operating Workbooks,
    contain 12 Sheets, then I imagined more then he said.

    The OP also claimed three times your code is ok but he needed much faster one.
    Well my code keeps 3 seconds in my PC (i8, 3rd generation), how much time your code in your PC?

    What about the code length and its simplicity?

    You have been the one that solved my first problem (a very hard problem for me) on my first
    appearance on this forum and I reputed you with "SOLVED by a Giant"... my fault!

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    JACK JOUSH,
    Try add lines in bold.
    Please Login or Register  to view this content.
    BTW
    To all the viewers in this thread.

    I saw a pointless post #12.

    I've just responded to the OP's request in post #6 saying
    Quote Originally Posted by JACK JOUSH
    Any help would be greatly appreciated!!! - thanks in advance...
    1) The option for choosing the one from the posted codes is only goes to the OP, no one else.
    It is only the OP knows his/her real situation.

    2) The length/simplicity of the code doesn't reflect "better", "faster" at all.
    The point is what/How it does, like my code is checking the existence of the "August" and "September" sheet in each workbook before processing further, otherwise it will fail completely.

    3) My code took around 1.5 sec after the selection of the folder for 5 workbooks on my little old PC.

  14. #14
    Registered User
    Join Date
    12-10-2020
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    77

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    Mr jindon, My tongue is unable to say thank you because saying thank you is not enough at all.
    I've tested the code on a lot of closed workbooks ( 120 workbook ) . it takes nearly 15 second and that's really perfect and amazing.
    Thank you for an elegant, efficient solution .... With my best wishes of good and great luck for you forever

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Copy specific sheets of multiple closed workbooks to new workbook

    You are welcome and glad you like it.
    Thanks for the warm words and rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Create new workbook & copy data over from existing workbook
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-14-2016, 06:12 AM
  2. [SOLVED] A macro to create a new workbook and copy data
    By mamuka12 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2016, 10:19 PM
  3. How can I copy data from one workbook and create another workbook?
    By anmol0611 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2015, 11:54 PM
  4. How to copy a data from another Workbook and create a graph in different workbook?
    By somani123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2015, 12:22 PM
  5. VBA Create new workbook and copy paste data
    By jayt91 in forum Excel General
    Replies: 8
    Last Post: 09-05-2014, 09:46 PM
  6. [SOLVED] Trying to Create a Calendar with Daily and Weekly Data Totals Directly from a Pivot Table
    By guyupstairs in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-04-2013, 12:19 PM
  7. Copy data from workbook, create new workbook, paste data to new worbook?
    By mpkavanagh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-16-2011, 06:39 PM

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