+ Reply to Thread
Results 1 to 4 of 4

Find and Delete Duplicates

  1. #1
    Registered User
    Join Date
    12-13-2014
    Location
    Boston, MA
    MS-Off Ver
    MS Office 2013
    Posts
    53

    Find and Delete Duplicates

    Hi all,

    I know this is likely a trivial question but I need help creating a macro that finds and removes duplicates in two columns of data. The remove duplicates option under data only removes a single data entry. I need the macro to find both and delete the corresponding rows.

    Example:

    Employee ID Employee Name
    1212345 Charlene Moss
    141478 Guy Starry
    101798497 Kalas,Jackie
    101407065 ponce,jimmy Benjamin
    101806578 Miller,Derrick
    101644866 Dericho,Jaiva
    101210576 Tice Jr,Michael Shawn
    100851057 Stewart,Kiyoshi
    101529933 Gonzalez,Beatriz T
    101407060 Copeland,Bridgette
    100897323 Tinker,Teasha
    101407065 ponce,jimmy Benjamin
    101806578 Miller,Derrick
    1212345 Charlene Moss

    Macro would remove all duplicates and the result would be:

    Employee ID Employee Name
    141478 Guy Starry
    101798497 Kalas,Jackie
    101644866 Dericho,Jaiva
    101210576 Tice Jr,Michael Shawn
    100851057 Stewart,Kiyoshi
    101529933 Gonzalez,Beatriz T
    101407060 Copeland,Bridgette
    100897323 Tinker,Teasha

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Find and Delete Duplicates


    Hi !

    The way you could automate : use (SUMIF) COUNTIF worksheet function on range ID, sort the result and delete rows where result > 1 …
    Last edited by Marc L; 11-25-2016 at 05:51 AM. Reason: COUNTIF instead of SUMIF

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Find and Delete Duplicates

    Please Login or Register  to view this content.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,356

    Re: Find and Delete Duplicates

    Try this.

    Please Login or Register  to view this content.
    Last edited by bakerman2; 11-24-2016 at 10:46 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to find duplicates, concatenate cells, then delete old duplicates (2)
    By cny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2016, 06:05 AM
  2. Macro to find duplicates, concatenate cells, then delete old duplicates
    By givemepuppies in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-04-2016, 02:43 AM
  3. Find and delete duplicates
    By Brian Douglas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2014, 03:06 PM
  4. [SOLVED] Find, add and delete duplicates
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2014, 12:36 AM
  5. [SOLVED] Macro to find duplicates, concatenate Unique Values, then delete old duplicates
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 04:32 PM
  6. [SOLVED] Find duplicates, concatenate into different column, sum and delete duplicates
    By rosannang in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 11:23 AM
  7. Deleting Duplicates-find out a way to delete duplicates
    By sighlent1 in forum Excel General
    Replies: 2
    Last Post: 04-19-2011, 10:17 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