+ Reply to Thread
Results 1 to 4 of 4

Creation of a Master Table

  1. #1
    Registered User
    Join Date
    08-13-2014
    Location
    Leeds, England
    MS-Off Ver
    2013
    Posts
    3

    Creation of a Master Table

    Hello,

    I have 17 tables all on different sheets. They all have 4 columns each and have the same column names each. Each table is named differently. I want to create a master table that contains all of the data of these smaller tables.

    Small Example.


    Table 1
    Column1 | Column2 | Column3 | Column4
    1 | 1 | 1 | 1


    Table 2
    Column1 | Column2 | Column3 | Column4
    2 | 2 | 2 | 2





    Creates the following table.




    Master Table
    Table 3
    Column1 | Column2 | Column3 | Column4
    1 | 1 | 1 | 1
    2 | 2 | 2 | 2

  2. #2
    Registered User
    Join Date
    07-23-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    23

    Re: Creation of a Master Table

    Create a new sheet. Use the consolidate option.
    Select the values you need in the master table
    Select Create links to source table if you want the master table to reflect any changes made in those tables

  3. #3
    Registered User
    Join Date
    06-19-2015
    Location
    Bogota
    MS-Off Ver
    Officce 365
    Posts
    54

    Re: Creation of a Master Table

    maybe this helps you http://www.mrexcel.com/forum/excel-q...ml#post4230690

    Cheers,
    Gerónimo

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Creation of a Master Table

    This may work for you. I created tables on Sheet2 and Sheet3 and on Sheet1 I have them combined.
    There are several formulae involved to number the rows on each worksheet consecutively.
    Eg. Sheet2!A2 this is used to produce consecutive numbers when there is data in column Sheet2 column B.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A1 of the worksheets that follow take the max value from column A of the previous worksheet.
    Sheet3!A1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A small table is created to show the worksheets and the max value of column A of each worksheet.
    Q
    R
    1
    0
    2
    Sheet2
    =MAX(INDIRECT("'"&Q2&"'!a:a"))
    3
    Sheet3
    =MAX(INDIRECT("'"&Q3&"'!a:a"))


    Sheet1!A2 has the following formula which is filled down column A and this copies the worksheet names the appropriate number of times according to the max number. Sheet2 is easy as it is the max of A:A but Sheet 3 number of rows is the max number - the max of the previous worksheet. This formula takes that into consideration with the MATCH function.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    With the sheet names now in column A of Sheet1, the values for each worksheet need to be retrieved. I have used VLOOKUP that makes use of the sheet name in column A.

    The VLOOKUP value is determined by the ROWS function that starts counting up from 1 with the argument ($1:1). The table array being addressed is established by the value in A2 and the range A2:E15. The INDIRECT function takes "'"&$A2&"'!a2:e15" and makes it a useable range that Excel understands as the Sheet name and cell range. The COLUMNS function is another counter for the column being returned. $A$1:B1 is 2 and as the formula is filled across, this value changes to $A$1:C1 and $A$1:D1 etc. to return the values from the incremented column.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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] Pivot Table Creation
    By Mike_e in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2013, 06:05 AM
  2. Table creation and index
    By CocoriCoy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2012, 10:52 AM
  3. Worksheet creation triggers addition of data to master sheet??
    By Hellraiser in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2011, 05:55 PM
  4. Excel 2007 : Master Template Creation within a worksheet
    By tgorski31 in forum Excel General
    Replies: 2
    Last Post: 05-21-2010, 10:34 AM
  5. Auto Creation Table?
    By chieff4i in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-04-2009, 02:52 PM
  6. Automatic table creation
    By sanjimmy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2008, 08:18 AM
  7. Pivot table creation
    By zfranks in forum Excel General
    Replies: 1
    Last Post: 03-15-2007, 02:27 PM
  8. Pivot Table Creation
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2006, 09:10 AM

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