Hi JapanDave,
I think you are just great for sticking with me on this issue, thanks a lot!
I have added to your code, as follows to clear the duplicate row from Column A to Column J:
Sub d()
Dim Mbox As String
Dim LR As Long, i As Long, found As Range
Application.ScreenUpdating = False
On Error Resume Next
LR = Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
Set found = Range("a:a").Find(what:=Cells(i, "b"), LookIn:=xlValues, LookAt:=xlWhole)
If Not found Is Nothing Then
Mbox = MsgBox("Duplicate Found, do you want to delete duplicate", vbYesNo, "Duplicate")
If Mbox = vbYes Then
Cells(i, 9).ClearContents
Cells(i, 8).ClearContents
Cells(i, 7).ClearContents
Cells(i, 6).ClearContents
Cells(i, 5).ClearContents
Cells(i, 4).ClearContents
Cells(i, 3).ClearContents
Cells(i, 2).ClearContents
Cells(i, 1).ClearContents
Else
Mbox = vbNo
Resume Next
End If
End If
Next i
Set found = Nothing
Application.ScreenUpdating = True
End Sub
Would there be shorter code to accomplish the same result?
One more thing is, can your Code be changed only to fire if Duplicates are not empty.
As it is at the moment, your code regards an empty Row, if there are two or more, as a duplicate, which in Computer terms may be correct. But the user won't understand it as such! they could just ask; "What is two or more of Nothing?"
Bookmarks