Cross check an old list against a new list

DaveMacdonald

Board Regular
Joined
Nov 28, 2013
Messages
52
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a roster of employees where A is last name and C is first name. I have a new list of folks that require a certain training that I want to record in AE. Is there a way to check each name in Columns A and C against a new list (columns A and B) and if the first list name is on the second list, to place a "x" in the original lists AE Column? and do to that for the whole table, (2:264)?

Sheet 1
ACAE
SmithDorothyx (Formula Here). I've tried =IF(AND(A:A='sheet2'!A:A,C:C='sheet2'!B:B),"x","") but that didnt work. I'm not entirely sure how vlookup/xlookup works but I thought that was my next step. I dont know though. It's got to be a match for both first and last names, theres a lot of folks with the same first or last name on the list.
AmosJack
SmithHarry

Sheet 2
AB
SmithDorothy
AmosSandy
PeachJames
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
you can join your two tables in Power Query. Load each to Power Query and then do a full join. Here is the Mcode for the full join

Power Query:
let
    Source = Table.NestedJoin(tblOld, {"Last", "First"}, tblNew, {"Last", "First"}, "tblNew", JoinKind.FullOuter),
    #"Expanded tblNew" = Table.ExpandTableColumn(Source, "tblNew", {"Last", "First"}, {"tblNew.Last", "tblNew.First"}),
    #"Added Custom" = Table.AddColumn(#"Expanded tblNew", "New", each if[Last]=[tblNew.Last] and [First]=[tblNew.First] then "x" else null)
in
    #"Added Custom"

and the result of the join

LastColumn1FirsttblNew.LasttblNew.FirstNew
SmithDorothySmithDorothyx
AmosSandy
PeachJames
AmosJack
SmithHarry
 
Upvote 0

Forum statistics

Threads
1,214,388
Messages
6,119,227
Members
448,878
Latest member
Da9l87

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