Code help please

  • This code is only deleting what the duplicate entry is, how can i make it to delete the row?

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Column = 1 And Len(Target.Value) > 0 Then

    If Evaluate("Countif(A:A," & Target.Address & ")") > 1 Then
    MsgBox Target.Value & " is a duplicate entry. It will be removed.", vbExclamation, "Data Entry Editor"

    End If

    End If

    End Sub

  • Re: Code help please

    Same as on ExcelForum.

    You should edit this thread and:

    • Give it an accurate, concise and descriptive title
    • Remove the [noparse][B][/noparse]old tags and any other formatting tags
    • Wrap your code in Code tags
    • Include links to all your cross posts dealing with this issue.

    Also posted on MrExcel.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!