+ Reply to Thread
Results 1 to 4 of 4

How to Join 2 excel sheets with a common column

  1. #1
    Registered User
    Join Date
    01-18-2024
    Location
    Bangalore
    MS-Off Ver
    Standard 2016
    Posts
    2

    How to Join 2 excel sheets with a common column

    Hi,
    I have data in 2 sheets with a common column which needs to be combined to form a larger table with complete information. Is it possible to do in Excel.

    The data in Table 1 is as below.

    User Role
    A AA
    A BB
    B AA
    C BB
    D ZZ

    In the 2nd table, the data is as below:
    Role Privilege
    AA 123
    AA 345
    BB 456
    BB 678
    CC 910

    The combined data needs to have a join of these tables and show output as below:
    User Role Privilege
    A AA 123
    A AA 345
    A BB 456
    A BB 678
    B AA 123
    B AA 345
    C BB 456
    C BB 678

    The able sample data is attached for easy reference.
    Sample Data.xlsx
    Last edited by narendrasr; 01-18-2024 at 06:41 AM. Reason: Added sample data

  2. #2
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,162

    Re: How to Join 2 excel sheets with a common column

    Welcome to the forum.

    Load the first table into PowerQuery and save as connection only, then load the second table and merge it with the first.

    M Code:

    Please Login or Register  to view this content.
    You would need to combine two workbooks if the source tables are not in the same file.

    If you need further assistance (if you have not used PQ before), just shout.
    Attached Files Attached Files
    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.

  3. #3
    Registered User
    Join Date
    01-18-2024
    Location
    Bangalore
    MS-Off Ver
    Standard 2016
    Posts
    2

    Re: How to Join 2 excel sheets with a common column

    Hi Ali,
    Thanks a lot for the quick reply. The output and the working sheet shared by you is exactly what I was looking for!
    I am not familiar with Power Query but I'll use the sheet shared by you to get familiarized. I may come back to you if I have any further doubts on the same. Once again, thanks for the detailed and quick reply to my query. This forum is amazing!

    Regards,
    Narendra Rana

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,304

    Re: How to Join 2 excel sheets with a common column

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Replies: 9
    Last Post: 01-07-2021, 11:13 AM
  2. [SOLVED] To compare columns A in two sheets and if much join column B
    By xlor in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-02-2014, 11:30 PM
  3. Combining and organizing 2 sheets with a common column
    By texas979 in forum Excel General
    Replies: 5
    Last Post: 08-19-2013, 06:51 PM
  4. Full outer join of data across two workbooks based on a common column
    By godric7gt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2012, 02:23 AM
  5. Excel 2007 : merge 2 sheets that have one common column
    By gbutehorn in forum Excel General
    Replies: 0
    Last Post: 09-06-2011, 01:43 PM
  6. Merge 2 sheets with common ID column
    By imimin in forum Excel General
    Replies: 6
    Last Post: 04-19-2011, 05:15 PM
  7. [SOLVED] How do I join two excel sheets?
    By petr in forum Excel General
    Replies: 1
    Last Post: 03-31-2005, 12:06 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