Results 1 to 6 of 6

Code help please

Threaded View

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    35

    VB Code to delete rows

    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"
    Range(Target.Address).ClearContents

    End If

    End If

    End Sub
    Last edited by biznez1; 07-26-2013 at 10:07 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 03-09-2013, 04:30 AM
  2. Adding Text to another cell VB code (Help Tweeking code) (Excel 2007)
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 11:37 AM
  3. Code for email alerts from excel isn't working, wrong code possibly?
    By jessthorogood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 01:45 AM
  4. Replies: 2
    Last Post: 03-17-2011, 08:55 PM
  5. Replies: 0
    Last Post: 10-06-2006, 09:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1