How To Compare Two Columns In Excel?

Gigiwan

New Member
Joined
Mar 31, 2021
Messages
47
Office Version
  1. 2016
Platform
  1. Windows
Hi
Here's a scenario I'm facing:

I have a data set for 2022 and 2023, both of which contain the identical table pattern for employee system responsibility, but in 2023, some of the given employee system responsibility are removed/added to them.

How do I find the difference between the two tables for each user?


New Microsoft Excel Worksheet.xlsx
ABCDE
1Employees data for 2023Employees data for 2023
2NameResponsibilityNameResponsibility
3User1ABUser1AC
4User1ACUser1AN
5User1ANUser1DE
6User1AEUser1AW
7User1AWUser1AT
8User1ATUser1AL
9User1ALUser1AM
10User1AMUser1WQ
11User1AAUser1AR
12User1ARUser1AY
13User1AYUser1OI
14User1AOUser1AP
15User1APUser1AN
16User2ANUser2PO
17User2XKUser2BN
18User2BNUser2WE
19User2AEUser2AW
20User2AWUser2OK
21User2OKUser2DS
22User2ALUser2OP
23User2OPUser2AA
24User2AAUser2WX
25User2ARUser2LR
26User2LRUser2YB
27User2AOUser2MU
28User2MUUser2CD
29User3CDUser3GB
30User3GBUser3JU
31User3JUUser3IK
32User3IKUser3LO
33User3LOUser3FR
34User3FRUser3WS
35User3WSUser3WE
36User3WEUser3YT
37User3YTUser3UY
38User3UYUser3IK
39User3IKUser3VC
40User3VCUser3NB
41User3NBUser3MJ
42User3MJUser3LK
43User3LKUser3JH
44User4JHUser4CH
45User4CHUser4OU
46User4QBUser4PD
47User4PDUser4BG
48User4ZOUser4RN
49User4RNUser4UM
50User4UMUser4CY
51User4CYUser4DC
52User4WBUser4CJ
53User4CJUser4hy
54User4hyUser4we
55User4weUser4HN
56User4hyUser4gt
57User4gtUser4bg
58User4bgUser4dc
59User4dcUser4UZ
60User4xsUser4po
61User4poUser4YU
62User5YUUser5TY
63User5TYUser5ZA
64User5ZAUser5CX
65User5CXUser5BG
66User5BGUser5KI
67User5KIUser5UY
68User5UYUser5TR
69User5TRUser5ER
70User5ERUser5VT
71User5QWUser5XS
72User5XSUser5VF
73User5VFUser5OL
74User5OLUser5QW
75User5QWUser5UY
76User5UYUser5JH
77User5JHUser5BH
78User5BHUser5VF
79User5VFUser5CD
80User5CDUser5
Sheet1
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Power Query Solution
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Source2= Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    MQ = Table.NestedJoin(Source, {"Name","Responsibility"},Source2, {"Name","Responsibility"}, "TBL", JoinKind.FullOuter),
    ExpandedTBL = Table.ExpandTableColumn(MQ, "TBL", {"Name", "Responsibility"}, {"Name.1", "Responsibility.1"})
in  ExpandedTBL
 
Upvote 0
Solution
Power Query Solution
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Source2= Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    MQ = Table.NestedJoin(Source, {"Name","Responsibility"},Source2, {"Name","Responsibility"}, "TBL", JoinKind.FullOuter),
    ExpandedTBL = Table.ExpandTableColumn(MQ, "TBL", {"Name", "Responsibility"}, {"Name.1", "Responsibility.1"})
in  ExpandedTBL
Tyvm sir, that worked for me!
 
Upvote 0

Forum statistics

Threads
1,215,107
Messages
6,123,126
Members
449,097
Latest member
mlckr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top