+ Reply to Thread
Results 1 to 7 of 7

Combine 2 tables into one

Hybrid View

jackson_hollon Combine 2 tables into one 12-21-2015, 11:34 PM
FDibbins Re: Combine 2 tables into one 12-21-2015, 11:39 PM
Gatti Re: Combine 2 tables into one 12-21-2015, 11:39 PM
jackson_hollon Re: Combine 2 tables into one 12-22-2015, 12:11 AM
Gatti Re: Combine 2 tables into one 12-22-2015, 12:41 AM
alansidman Re: Combine 2 tables into one 12-22-2015, 01:11 AM
sandy666 Re: Combine 2 tables into one 12-22-2015, 05:48 PM
  1. #1
    Forum Contributor
    Join Date
    06-07-2013
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    485

    Combine 2 tables into one

    Hello,

    I have two Excel tables, A and B. There is redundant data in both tables as well as unique data.
    All I want is to combine both with no redundant records automatically. (A+B-Redundant= Uniq complete data). I have attached the result I want.

    Please help.

    Thanks.
    Attached Files Attached Files
    Last edited by jackson_hollon; 12-22-2015 at 12:11 AM.

  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
    53,048

    Re: Combine 2 tables into one

    You have apple listed twice, is that correct?
    Which values do you want returned?
    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
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Combine 2 tables into one

    You can use the Consolidate tool in Data Tab

    Click in the cell you want to show the result, then click on Consolidate Buttom

    Just add the Ranges of Products, with Name and Amount headers

    Function: Sum

    This way:

    Capturar.JPG

    ** The words are in portuguese... but the buttoms are the same. **

    Hope it solves your problem

    (Don't know why it doubled the image... the first one is the right one)
    Attached Images Attached Images

  4. #4
    Forum Contributor
    Join Date
    06-07-2013
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    485

    Re: Combine 2 tables into one

    FDibbins and Gatti

    Sorry I didn't use a good example. I re-attached a sample in the first thread. The Apple should be listed twice as they both have a different value (currency).

    I need to combine these tables into one. I do not know how to do it. These tables are only small in the sample, but in real they are 6500 rows. I need to automatically combine them into a new table otherwise if we forget to refresh the table or do the consolidation, we will send to our customers with wrong quote with wrong currency.

    Thanks for the help.

  5. #5
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Combine 2 tables into one

    I guess you can just CTRL + C and CTRL + V then use the Remove Duplicates tool...

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Combine 2 tables into one

    If I were doing this, I would put each table on a different worksheet. Then import each table into Access and create a UNION ALL Query to join the two tables.

    Capture.PNG
    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

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine 2 tables into one

    maybe:

    1. create 4 lists because it's easier (see in attachment)
    2. helper column, K3 (with Control+Shift+Enter):
    =IFERROR(IFERROR(INDEX(list11&list12,MATCH(0,COUNTIF($K$2:K2,list11&list12),0)), INDEX(list21&list22,MATCH(0,COUNTIF($K$2:K2,list21&list22),0))), "")
    3. col. Name, L3:
    =IFERROR(LEFT(K3,LEN(K3)-3),"")
    4. col. Amount, M3:
    =RIGHT(K3,3)


    EDIT:
    another way:
    1. Select table A with headers
    2. Click Data tab (Ex2016) or Power Query (Ex less then 2016)
    3. Click From Table
    4. In the window that opens click Close and Load
    5. New sheet (sheet2) is inserted with the data from first table (table A)
    6. Repeat the steps to add table B
    7. Click on "new" table A and from Query Tools - Query (Ex2016) or Power Query (Ex less then 2016)...
    8. Select Append
    9. In new window select a table from each drop down then click OK
    10. in Query Editor window select Remove Duplicates
    11. Close and Load
    12. On sheet3 you will get result.

    sandy Book1-2.xlsx
    Last edited by sandy666; 12-22-2015 at 11:03 PM.

+ 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. Best way to combine two tables into one.
    By Minot1988 in forum Excel General
    Replies: 0
    Last Post: 10-16-2014, 09:33 AM
  2. Combine two tables to one
    By InterstateRentals in forum Excel General
    Replies: 8
    Last Post: 01-27-2014, 07:30 PM
  3. Combine 3 tables into 1
    By krneki in forum Excel General
    Replies: 3
    Last Post: 12-23-2013, 11:39 PM
  4. Combine two tables
    By Ashleyyy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-10-2012, 02:34 PM
  5. Combine 2 tables together
    By nikolas22t in forum Excel General
    Replies: 6
    Last Post: 12-13-2006, 05:52 AM
  6. [SOLVED] I would like to combine information from 2 tables in just one?
    By Valinox.pt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-02-2006, 03:45 PM
  7. how combine multiple tables into one
    By Pinocchio in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 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