+ Reply to Thread
Results 1 to 6 of 6

Combining the contents of two tables or sets of data.

  1. #1
    Registered User
    Join Date
    09-18-2020
    Location
    Dallas, Texas
    MS-Off Ver
    Pro Plus 2016
    Posts
    1

    Combining the contents of two tables or sets of data.

    Hi everyone, this is my first post here and first time here. I was wondering if you could help me with what is probably a pretty simple question.

    I am trying to combine two tables (or two sets of data in two columns together)

    Example:
    Example.PNG

    As you can see both tables have letters that correspond to one another and some that do not. The end goal of this combination would be to put both datasets into one table and combining the integers that correspond to the respective numbers and then adding new row for those that do not correspond.

    Just as an example the end result of this would ideally be

    Example 2.PNG

    As you can see A B C D E and H I J have combined into one line, F and G, already existing in the first table remain the same. K and L, unique rows from the second table have been added to the first one. These do not have to be tables if it is easier, they could just be rows and columns and then made into tables after.

    I figure I am missing something quite obvious here, I guess my brain has shut down for the weekend - I did these manually in the example but this needs to be done for several hundreds rows over a load of documents. My job description does really involve a tremendous amount excel but over the last year I have found myself using formulas a lot! This though, I am unfamiliar with.

    Thank you for your help.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Combining the contents of two tables or sets of data.

    well, to sum the data where more than 1 num appears associated with any given letter, the SUMIF() function will do that for you. so check that out. regarding the creation of new rows in a table for the other data, more than likely there is more than one resource in excel to do it, however code would probably be easiest. I don't use interface functions in excel at all, hardly ever, so if there is an answer in that regard, i would not be the person to ask.

    by the way, welcome to this community. I have a friend in Dallas. a real estate investor. very intelligent man. he's not a technology person, but still, based on what he does, one can learn a great deal from him. I am a big fan of Texas.

  3. #3
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Combining the contents of two tables or sets of data.

    Here's a bit of a messy approach. Refer to the following picture.

    two_table_merge.png

    The formulas are as follows:
    A14 then copied down for the length of the first table
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    B14 then copied down for the length of the first table
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In A24 then copied down for the length of the second table
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This is an array formula and needs to be committed via CTRL-SHIFT-Enter

    In B24 then copied down for the length of the second table
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This is an array formula and needs to be committed via CTRL-SHIFT-Enter

    Hopefully this is of some use to you (until someone comes up with a simple Power Query approach)

    See attached workbook.
    Attached Files Attached Files
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: Combining the contents of two tables or sets of data.

    Response #1
    You can consider using the Consolidate function of OFFICE EXCEL itself to calculate

    435K compressed dynamic operation file has been prepared. Since the forum is limited to 100K, there is no way to upload it. In addition, consider Power Query solution
    Last edited by wk9128; 09-19-2020 at 01:19 AM.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Combining the contents of two tables or sets of data.

    Or use PowerQuery to append the tables and then group with a sum aggregation.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Combining the contents of two tables or sets of data.

    Hi,

    Power Query solution, quite straight forward using Group By

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Christopher Yap

+ 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. Combining contents of two tables
    By TimTS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2019, 12:14 AM
  2. Combining 2 sets of tables
    By Shmueld in forum Excel General
    Replies: 3
    Last Post: 08-19-2018, 09:21 AM
  3. Combining two data sets (tables), with one common denominatior
    By lomacm in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-29-2013, 02:59 AM
  4. [SOLVED] Combining two unlike sets of data
    By smls in forum Excel General
    Replies: 4
    Last Post: 07-09-2012, 11:22 AM
  5. Combining two data sets
    By Teacher in forum Excel General
    Replies: 10
    Last Post: 09-11-2011, 12:11 PM
  6. combining two data sets
    By pani_hcu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2009, 12:43 PM
  7. Combining two sets of data
    By chrmlr2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-28-2009, 09:41 PM

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