+ Reply to Thread
Results 1 to 5 of 5

VB Code to Consolidate data from different files / tabs

  1. #1
    Registered User
    Join Date
    03-29-2007
    Posts
    63

    VB Code to Consolidate data from different files / tabs

    Hi All,

    I have multiple files and each of them may have multiple tabs. Each tab is in the same data layout.

    Say Column A to Column E

    I am looking for a VB Code that can consolidate the files/tabs into one single file / tab. When I run the VB code, it will prompt for an open file dialogue so I can select new file(s).
    Then the VB will append the new data to the existing tab.

    I appreciate if anyone can help on this. Thanks….

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: VB Code to Consolidate data from different files / tabs

    tt388,

    Something like this?
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

    EDIT: Updated code to include all worksheets from the chosen file to be imported, not just the first one
    Last edited by tigeravatar; 06-29-2011 at 11:35 AM.

  3. #3
    Registered User
    Join Date
    03-29-2007
    Posts
    63

    Re: VB Code to Consolidate data from different files / tabs

    tigeravatar,

    Thanks for the code. It works quite well as what I need, but there is a header row on each tab. When I mirgrate the data, it includes the header as well.

    Any idea to elminate the hearder row? thanks...

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: VB Code to Consolidate data from different files / tabs

    tt388,

    Change this line:
    Please Login or Register  to view this content.


    To this instead:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  5. #5
    Registered User
    Join Date
    03-29-2007
    Posts
    63

    Re: VB Code to Consolidate data from different files / tabs

    tigeravatar,

    The new codes work perfectly. 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