Match Data between 2 columns and fetch the matching data to a 3rd column

ssinha23

New Member
Joined
Aug 31, 2016
Messages
16
I have two sheets in the same excel, where I have names of students in column A of both sheets. I need to match which names appear in both the sheets in column A and put that on a different sheet.

For Examaple, suppose I have A, B, C ,F, K , H ,M , L, Y, Z in column A of sheet 1 and have the names of C, M, K, A, J, R, Y, E, D, Q, X in sheet 2, then these two columns should be compared, and then the matching names in both of them which are A, C, K, M, should come up on column A in sheet 3.

Let me know if more details are needed.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Bring each sheet into Power Query/Get & Transform.
Merge the two tables with a Left Inner Join. Here is the Mcode for that procedure. Close and Load the VB Editor to a new sheet.

Rich (BB code):
let
    Source = Table.NestedJoin(Table1, {"Column1"}, Table2, {"Column1"}, "Table2", JoinKind.LeftOuter),
    #"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Column1"}, {"Column1.1"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Table2", each ([Column1.1] <> null)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Column1.1"})
in
    #"Removed Columns"

Book6
A
1Column1
2A
3C
4M
5K
6Y
Sheet3
 
Upvote 0

Forum statistics

Threads
1,214,382
Messages
6,119,194
Members
448,874
Latest member
Lancelots

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