+ Reply to Thread
Results 1 to 3 of 3

Merging Data from Separate Tables

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    25

    Merging Data from Separate Tables

    Hi all,

    I have multiple data tables in which I want to combine into one table. However, some tables have replicate names, and I want to combine those names into one cell with the sum of the values from all the tables.

    Perhaps the graphic below will explain it better...trying to the get to the table named "Final" from the other two tables.

    Is there any way to do this? I have looked at this guide but am stuck: http://www.exceluser.com/explore/msquery1_4.htm


    Please keep in mind that I have more than two tables, and the graphic below is just a simple example.

    Finally, I do not have Microsoft Access, and am using Microsoft Query in Excel. Was told to post my question here.



    Thanks to anyone that can help!
    Attached Images Attached Images

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

    Re: Merging Data from Separate Tables


    Is there any way to do this? I have looked at this guide but am stuck:
    What does this mean? What have you done in MS Query and what doesn't work?

    Are you able to post a sample of the data you have that you want to consolidate versus a picture. No one wants to recreate your data for you. Upload your sample worksheets and perhaps, if time allows, I can develop a step by step tutorial. It will require an Union query and I am not sure that it is possible in MS Query, but will investigate once I see your hard sample data.
    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
    10-25-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: Merging Data from Separate Tables

    Are all the columns in both tables named the same? If so, append all the data from Table 1 and Table 2 to another Table. Create a make table query based on the new table where you sum the points column. When you run the query it should create a table totaling your points column based on the unique data from name column.

    Here is the SQL statement for the query.

    SELECT JoinedTables.Name, Sum(JoinedTables.Points) AS SumOfPoints INTO Combined
    FROM JoinedTables
    GROUP BY JoinedTables.Name;

    JoinedTables is the table where you placed the data from both tables. Combined is the new table.

+ 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