Finding Duplicated Value from two different Excel file

bad

New Member
Joined
Apr 29, 2005
Messages
16
I need to create a formula (or marco) to find a duplicated values between two Excel files.

One file is a list of 5000 SSNs and any duplicated SSN needs to be checked against the second file which has 30,000 SSN and deleted from either the first or second file.

Any suggestions how to automatically delete the duplicated SSNs?

Dana
USA
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
One easy way would be to use =VLOOKUP() in a column to find duplicate values (unique values will show #N/A). Sort on that column to get the values together, and then delete the rows.
 
Upvote 0

bad

New Member
Joined
Apr 29, 2005
Messages
16
Hello Brian,

Thanks for the response. Do I have to first merge the two file and then complete the =VLOOKUP()? I don't understand how the formula works in the spreadsheet. Could you pls explain more?

Again, thanks for your assistance!
Dana
USA
 
Upvote 0

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
There are several ways of doing this sort of thing.
The way I have suggested is to make a new column in each file with a =VLOOKUP() formula to look up the value in the other file. If it finds it, it is a duplicate. Please see Excel Help for =VLOOKUP()

If you can add the 2 files together this is easier because you can sort on the column and have a formula in another column like :
=IF(A1=A2,1,0)
This puts a 1 in the column if a duplicate is found.
Select the column. Edit/Copy then Edit/PasteSpecial values to convert the formulas to values, then sort on the column to get all the duplicates together.
 
Upvote 0

Forum statistics

Threads
1,195,629
Messages
6,010,776
Members
441,569
Latest member
PeggyLee

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
Top