Delete duplicates on 2nd workbook

D

Dude

I have 2 workbooks with contact information as follows;

company address city state zip phone
contact
123 co. anystreet anyttown tx 12345 (123)456-7890 joe smith

One is the 2008 listing, and the 2nd one is the 2009 listing.

Both lists contain over 200k entires.

I need to compare the 2, and delete all duplicate entries in the 2009 list,
leaving only the new additions in 2009 to work with.

Is this possible in excel, or do I need to get Access now?
 
D

Don Guillett

Why not copy 2008 info to 2009>sort>run a macro to compare from the BOTTOM
up deleting rows that match.
 
D

Dude

Ok, its running.
With close to 1/2 of a million entries, this might take a while. Ill follow
up the post after its done.

Thank you Don.

John
 
D

Dude

Ok, it was taking a long time.

I ended up breaking out 30k listings at a time and running them, then
copy/paste to a new worksheet. Running the whole 440 thousand names was 4.5
hours and still not done, and it only takes about 4 minutes to run 30k at a
time.

Thanks for the help.
 
D

Don Guillett

2008 on one sheet and 2009 on the other. Run from 2008

Sub nodupes()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Application.Match(Cells(i, 1), _
Sheets("2009").Columns(1), 0) Then Rows(i).Delete
Next i
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
msgbox "done"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top