Pooja,
See if this will work for you. It worked for me on the same that you sent, but I would play around with it a little before you do it for real on the 22,000
Sub aaa()
Dim lLastRow As Long, lRow As Long
Dim sOldAPN As String
Dim boDup As Boolean
lLastRow = Cells(Rows.Count, 1).End(xlUp).Row
sOldAPN = Cells(lLastRow, 1).Value
For lRow = lLastRow - 1 To 1 Step -1
If Cells(lRow, 1).Value = sOldAPN Then
Range("A" & lRow).EntireRow.Delete
boDup = True
Else
If boDup = True Then
Range("A" & lRow + 1).EntireRow.Delete
boDup = False
End If
sOldAPN = Cells(lRow, 1).Value
End If
Next lRow
End Sub
Bookmarks