Basically I have two huge lists and need to do what the title of the thread says.
The first list is from about 3yrs ago and is very large
The second list is from recently and is about half the size.
I need to find all records on the SECOND list that are NOT on the first list (new records that have been added since the first list was generated). I do not care about records on the first list that are not contained in the second list.
I was thinking that if there is a way to delete both of the duplicate records, I would be left with only records that are only included on one list. Before the formula/macro was executed I would color code each list and simply remove all of the records from the original list, leaving me with only records contained in the second list but not the first.
I found this macro on excel and it isn't doing what I need it to do...
Sub DelDups()
'Determine the number of items in column B
lastRow = Cells(Rows.Count, 2).End(xlUp).Row
On Error GoTo Done
'Loop through rows, starting at the bottom
For delRow = lastRow To 1 Step -1
'If duplicates are found, delete both rows
If Cells(delRow, 1) = Cells(delRow - 1, 1) Then
Cells(delRow, 1).EntireRow.Delete
Cells(delRow - 1, 1).EntireRow.Delete
End If
Next
Done:
End Sub
I ran that macro and it is not deleting records that appear in both lists.
And yes, before anyone asks, I made sure the data I wanted to filter was in column b.
Bookmarks