MS EXCEL as list Manager

  • Thread starter Thread starter Bob Garcia
  • Start date Start date
B

Bob Garcia

I want to merge an address list in Excel from two
different years, being able to not replicate names that
are the same on both years. I want to use the most
recent year on duplicate addresses. Any help would be
appreciated. Thanks Bob
 
Try this:
Assumes ALL names in Col A and ALL dates in Col B

Sub HighestDate()
For i = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
If Cells(i, 1) = Cells(i + 1, 1) Then
If Cells(i + 1, 2) > Cells(i, 2) Then
Rows(i).Delete
Else: Rows(i + 1).Delete
End If
End If
Next
End Sub
 
Back
Top