+ Reply to Thread
Results 1 to 8 of 8

Creating third sheet with data from first and second sheets by matching a unique ID

  1. #1
    Registered User
    Join Date
    08-22-2020
    Location
    London, England
    MS-Off Ver
    Latest 2020
    Posts
    20

    Creating third sheet with data from first and second sheets by matching a unique ID

    Hi,
    I have a table on Sheet 1 and a table on Sheet 2.
    Each entry in has a unique ID. That ID is that only thing that matches a product/row on Sheet 1 with a product on Sheet 2.

    I want to have a Sheet 3 that merges data from Sheet 1 and 2 into a larger table that contains all the data (i.e. all the columns - but without obviously duplicating the columns).

    IMPORTANT:
    - The size of tables is often different.
    - And not all entries on sheet 1 have a matching entry on sheet 2 and viceversa.

    Any suggestions? Maybe using pivot tables or other "joining" functions?

    Thank you

    Update: also posted here: https://www.msofficeforums.com/excel...eets-into.html
    Attached Files Attached Files
    Last edited by Ricko_uk; 08-25-2020 at 03:26 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    If no better solution comes up, this could be an option:
    In A2, an array formula. Depending on your Excel version, you may have to confirm with Ctrl+Shift+Enter instead of just Enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In B2 and copy to C2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In D2 and copy to E2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy formulas down.

    Good luck!

  3. #3
    Registered User
    Join Date
    08-22-2020
    Location
    London, England
    MS-Off Ver
    Latest 2020
    Posts
    20

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    Thank you,
    I got it working by pasting the Unique IDs into sheet 3 but as I mentioned although Sheet 1 and 2 contain mostly the same IDs there are also very many IDs that are only on Sheet 1 and only on Sheet 2. That means that with that solution I would have to
    1) either copy both columns of IDs into sheet 3 which then result into duplicates and twice the number of rows
    2) manually somehow remove all the duplicates which with 10s of thousands of rows is not feaseable

    Also in the uploaded sheet I only put a couple of columns in each sheet but there are 30 to 40 columns in each sheet and they all need to be combined without duplicating any column.

    Also, with the final version, all I need to do is to just paste data into sheet 1 and sheet 2 and everything else i automated

    Any further improvement of that version and/or any new solution?

    Thank you again
    Last edited by Ricko_uk; 08-24-2020 at 04:25 PM.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)

  5. #5
    Registered User
    Join Date
    08-22-2020
    Location
    London, England
    MS-Off Ver
    Latest 2020
    Posts
    20

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    Hi Pepe,
    not sure what you are referring to.

    I had a conversation about this in previous posts and the other posts I made in another forums were flagged by someone else providing the links so I did not also add mine. Am I suppose to do that too? Add the same comment to the link even if someone else already has?

    Also this is the only other post and I already and I did insert the link to this forum in my OP: https://www.msofficeforums.com/excel...eets-into.html

    Can you please explain because am rather confused... :o
    Last edited by Ricko_uk; 08-25-2020 at 02:27 PM.

  6. #6
    Registered User
    Join Date
    08-22-2020
    Location
    London, England
    MS-Off Ver
    Latest 2020
    Posts
    20

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    Oh, I misread your post. You wanted to add the link here.

    I added it to the OP above.

    So how does it work? If a month later I post the same question that I posted here somewhere else (i.e. AFTER I posted here) then I have to come back here, find the post and update the original OP? Is that how it works?

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    Have you read the link provided in post #4? I will provide it again https://www.excelguru.ca/content.php?184
    If you take a moment to read it, you can draw your own conclusions

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Creating third sheet with data from first and second sheets by matching a unique ID

    My approach in sheet 3:

    List all ID in sheet 1 first, until ending, then

    Check each ID in sheet 2 to get the unique ID in both sheets, then establish.

    A2:
    Please Login or Register  to view this content.
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

    Then use VLOOKUP for the last 4 columns.
    Attached Files Attached Files
    Quang PT

+ 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. creating a unique list from matching 2 columns
    By cnak in forum Excel General
    Replies: 6
    Last Post: 09-09-2019, 05:45 PM
  2. [SOLVED] Creating New Worksheets, Copying Data to New Sheet Based on Matching Column Header
    By cbauer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2017, 03:21 AM
  3. Macro taking rows of data and creating unique sheets
    By jharvey87 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-14-2016, 07:01 AM
  4. Replies: 3
    Last Post: 07-08-2014, 03:10 PM
  5. [SOLVED] Matching Cells from two seperate sheets of excel data while creating a third sheet
    By TobyJoel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2012, 04:29 PM
  6. finding Matching data and creating unique list
    By Mark_Delaware in forum Excel General
    Replies: 7
    Last Post: 11-12-2010, 12:11 PM
  7. Replies: 4
    Last Post: 02-14-2008, 12:28 PM

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