+ Reply to Thread
Results 1 to 6 of 6

Consolidate Multiple Data Tables

  1. #1
    Registered User
    Join Date
    12-02-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Consolidate Multiple Data Tables

    Hi there,

    I'm looking to consolidate multipe data tables in to a master table, so that the master table updates when the source tables are changed.

    The columns are fixed and identical, but the number of rows in the source tables is undetermined (refreshes from various other XML sources).

    The ulitmate goal is to base a pivot on the Master table - I've tried the consolidate multiple ranges feature for that, but I need more access within the pivot.

    Any suggestions appreciated.

    Cheers,

    Steve

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Consolidate Multiple Data Tables

    Hey Dangermouse1881,

    Be careful what you ask for. Find the attached with lots to learn.. I wrote some VBA code that clears the Master sheet and then grabs all the sheets to the right of the first and appends the data on the Master Sheet.

    Then the attached has a Dynamic Named Range of MasterDataTable that expands or contracts based on how big the master table is.

    Then the Pivot Table is shown which uses the Dynamic Named Range as it's source data.

    I've created some fake data of Col A = dates and Col B = Amounts so you could test it out. Add more sheets if you like or add more data to any Source Sheet.

    Finally I created a button on the Master to run the VBA code.

    hope this helps.
    BTW - if this data and the code don't work you should supply a sample of your data so the code can be modified to work with your data. Caution - On Row 1 of all sheets you can't have stuff to the right of the data table. This will make my ColCnt wrong and might mess things up.

    I'm attaching the .xlsm and the .xls because I'm not sure which version you have. The .xls may have some compatibility problems with the RandBetween formula and some grouping on the pivot.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    12-02-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Consolidate Multiple Data Tables

    Wow thanks Marvin, this looks very comprehensive.

    A couple of quick questions:

    - Is it possible to modify this solution to use the Excel 2007 table feature (sorry I should have mentioned version at the start) rather than dynamic ranges?

    - If the above is possible, could I supply the VBA code with a range that includes references to all names of the tables I want to include in the append?

    You're right about the learning! The VBA is a little beyond me here, I can see the basic loop structure going on but thats about it so far!

    Thanks again,

    DM

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Consolidate Multiple Data Tables

    Hi DM,

    Anything (mostly) is possible but sometimes there are easier ways to do them. If you supply a sample I can look. You will need to explain why you want to use Tables on the Source sheets. I'm a little concerned/confused about a table that is filtered and if all records will be copied from the source to the master. Sometimes great ideas conflict with each other.

    Keep learning VBA and ask questions about what statements do. Learn how to set breakpoints in VBA and step through the code as this is a great learning tool. Read http://www.cpearson.com/excel/Debug.htm

  5. #5
    Registered User
    Join Date
    07-14-2011
    Location
    new jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Consolidate Multiple Data Tables

    this sounds similar to an issue I'm having, with a twist: I need to be able to append (combine) or consolidate a few tables into one master table, but WITHOUT using any code or other applications...Can this be done??? Thanks...Wissam

  6. #6
    Registered User
    Join Date
    07-14-2011
    Location
    new jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Consolidate Multiple Data Tables

    how can I merge, append, consolidate multiple XL tables into a Master Table without using code or other applications?
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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