+ Reply to Thread
Results 1 to 3 of 3

Combining sheets from different workbooks

  1. #1
    Registered User
    Join Date
    12-17-2019
    Location
    Leeds, UK
    MS-Off Ver
    365
    Posts
    61

    Question Combining sheets from different workbooks

    Hi All,

    I have 20 workbooks all located in a folder. In each workbook, worksheet #4 is called "4. Class Data".
    In a master workbook, I'd like to import each "4. Class Data" sheet only.

    I'm after a VBA macro which can process this.

    I've started with this:

    Please Login or Register  to view this content.
    [code]

    This doesn't work, and I think it's because the master sheet can't have 20 sheets all named "4. Class Data". Ideally, I'd love for the sheet name being imported from a given workbook be renamed to, for example, the 2nd word of the file name it's coming from, as this will be unique.
    I've obviously changed the file path for sensitivity reasons, so I know that's not the issue.
    Any help would be great. Thanks
    Last edited by alansidman; 06-23-2022 at 05:59 PM.

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

    Re: Combining sheets from different workbooks

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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
    12-17-2019
    Location
    Leeds, UK
    MS-Off Ver
    365
    Posts
    61

    Re: Combining sheets from different workbooks

    Quote Originally Posted by alansidman View Post
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Apologies, wasn't aware of this norm! Fixed

+ 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. Replies: 2
    Last Post: 06-08-2021, 04:05 PM
  2. VBA + Combining specific sheets, from multiple workbooks into one worksheet
    By benoj2005 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2020, 05:39 AM
  3. Combining columns across sheets and workbooks.
    By lamenters in forum Excel General
    Replies: 2
    Last Post: 03-26-2014, 08:00 AM
  4. Replies: 0
    Last Post: 11-29-2012, 04:50 AM
  5. Combining Multiple Workbooks / Separate Sheets
    By Orangeworker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2010, 01:59 PM
  6. Combining Sheets from 5 Workbooks into 1 Sheet
    By Topdrop18 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-15-2010, 04:35 PM
  7. Combining sheets from multiple workbooks into master
    By jaikin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-20-2009, 11:59 AM

Tags for this Thread

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