+ Reply to Thread
Results 1 to 8 of 8

Macro to combine three spreadsheets into 1

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Macro to combine three spreadsheets into 1

    I have three separate documents that are updated on constant basis by 3 different people.
    Those three documents are linked to a 4th document and will update every hour.
    I need to summarize this information automatically for dashboard purposes.
    I can't use a pivot table because most of the data is text so a pivot table from multiple ranges does not work.
    I wrote a macro to consolidate the data and it works. I can use that data to pivot from there. But I can't repeat that macro.
    I need a way to update that consolidated information. as the the three sheets are updated.

    Macro below: sample workbook attached.
    Thanks for your help!

    Please Login or Register  to view this content.
    Moderators note: code tags added for you - this time
    Attached Files Attached Files
    Last edited by joyhampton; 10-02-2013 at 08:05 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Macro to combine three spreadsheets into 1

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    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, it also maintains VBA formatting.

    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
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to combine three spreadsheets into 1

    The code consolidate all sheets, except sheet 1 in to sheet1.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Macro to combine three spreadsheets into 1

    Thanks AB33... I think that works!

  5. #5
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Macro to combine three spreadsheets into 1

    AB33 I can get the code to work, but I'm having trouble translating it to work in my actual workbook.
    Can you walk me through the code? I'm going to run this code in the same workbook for 4 sets of 3 worksheets.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to combine three spreadsheets into 1

    Use this line

    Please Login or Register  to view this content.
    which says consolidate the sheets in the array. Change the names of the sheet to suit your needs.

  7. #7
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Macro to combine three spreadsheets into 1

    Thanks!
    And do I have to run the macro each time I want to refresh or will it be automatic?
    I'm sorry if this was a remedial question.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to combine three spreadsheets into 1

    No,the code is not auto, you have to run it.
    I have Created a button on the master sheet and link it to the code so that you do not need to go in to the module to run it, just press it to run it.
    The code first clear the data on the master sheet(Sheet1) except the header.
    Attached Files Attached Files

+ 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] Combine two spreadsheets
    By Clash in forum Excel General
    Replies: 3
    Last Post: 09-12-2013, 10:09 AM
  2. [SOLVED] Macro/Formula to Combine Two Spreadsheets -2
    By tgudex in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-19-2012, 06:59 PM
  3. [SOLVED] Macro/Formula to Combine Two Spreadsheets
    By tgudex in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-14-2012, 07:39 PM
  4. Macro to combine spreadsheets
    By souljive99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2009, 10:25 AM
  5. [SOLVED] Combine two spreadsheets using Macro
    By jlogsdon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-23-2005, 07:06 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