+ Reply to Thread
Results 1 to 4 of 4

Duplicate Entries need to be Deleted after checking Date

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    berlin
    MS-Off Ver
    Excel 2010
    Posts
    10

    Duplicate Entries need to be Deleted after checking Date

    HI
    I hope an easy Question:
    My XL sheet has Duplicate entries what i need "Prune" according to the Latest EXPiry Date.
    -
    The Sheet is sorted by KNUMBER.
    After an update from another File.It happens that there are multiple entries (every Week)!

    I need to DELETE these entries from this sheet (the MASTER)
    Any KNUMBER (Customer Number)that has a LATER EXP(iry) Date Remains
    Can anyone help me with this..
    I attach the Small file .
    Many thanks in Advance
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,257

    Re: Duplicate Entries need to be Deleted after checking Date

    Hi tgracey,

    I believe using the Advanced Filter with the "Unique Records Only" box checked will do what you want.
    http://office.microsoft.com/en-us/ex...003073425.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-10-2012
    Location
    berlin
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Duplicate Entries need to be Deleted after checking Date

    HI Marvin,
    many thanks for the TIP.
    I did try that and although it will Delete many duplicate Records, which is really helpful it will not delete for example the one record on the Attached Excel sheet with a "Later Date"... which is what i am after,,
    Any Ideas why not or how to get round it?
    Thanks Again
    Ted

  4. #4
    Registered User
    Join Date
    02-10-2012
    Location
    berlin
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Duplicate Entries need to be Deleted after checking Date

    I have seen a Small Macro by CPearson what does the Trick, but once run there is no turning back Or -UNDO
    Sub DeleteTheOldies()
    Dim RowNdx As Long
    For RowNdx = Range("A1").End(xlDown).Row To 2 Step -1
    If Cells(RowNdx, "A").Value = Cells(RowNdx - 1, "A").Value Then
    If Cells(RowNdx, "B").Value <= Cells(RowNdx - 1, "B").Value Then
    Rows(RowNdx).Delete
    Else
    Rows(RowNdx - 1).Delete <<-- can this be changed to HIDE?
    End If
    End If
    Next RowNdx
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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