+ Reply to Thread
Results 1 to 3 of 3

Remove duplicates for unsorted data

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    20

    Remove duplicates for unsorted data

    Hello,

    I need a VBA code to remove the duplicate records for the unsorted data. I would like to retain the latest row with duplicate and remove the first one.
    Here is the data how it looks:
    1 AAIBH00 Retain
    2 AAIBJ00 Retain
    3 AAIBL00 Retain
    4 PCADM00 Remove
    5 PCAGV00 Remove

    6 AAJNV00 Retain
    7 AAJOS00 Retain
    8 AAJOU00 Retain
    9 PCADM00 Retain
    10 PCAGV00 Retain

    I want the rows 4 an 5 to be removed as it has duplicate record in 9 and 10. This has to happen without sorting any data or using unique filters.
    Let me know for the code to do this.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Remove duplicates for unsorted data

    Why dont you want to sort the rows?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Remove duplicates for unsorted data

    Hi,
    below loop will do...???
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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