+ Reply to Thread
Results 1 to 8 of 8

Macro to find Duplicates

  1. #1
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Macro to find Duplicates

    Hi Champs,

    consider my example, i have many rows in a excel in which ID is unique.

    But the ID has duplicated in many occurence.

    I need a macro to highlight all the rows which is duplicated.


    i have attached sample for the reference.sample.xlsx

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to find Duplicates

    Hi Seeker,

    Your sample was all duplicates??

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Macro to find Duplicates

    mAY BE..

    Please Login or Register  to view this content.
    Last edited by Debraj Roy; 11-27-2014 at 06:27 PM.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to find Duplicates

    Hi Debraj,

    Thanks for altering the code - it's just about what I had thought to do

  5. #5
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: Macro to find Duplicates

    Thanks for the macro.

    your macro works with all the data which are duplicates.

    eg

    111010 AAA 100AB 5,000
    111010 AAA 100AB 5,000


    is any edit can be done in macro so that if any two cells are duplicates, the same has to be highlighted.


    eg:
    111010 AAA 111GG 5,000 - Duplicate
    111010 AAA 100AB 5,000 - Duplicate

    or

    111010 BBB 111GG 1,000 - Duplicate
    111010 AAA 111GG 1,000 - Duplicate


    ??. please help

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to find Duplicates

    Any two - do you mean the ID and one other or any one and any other??


    This will handle the ID plus one other field:

    Please Login or Register  to view this content.
    Last edited by xladept; 11-28-2014 at 06:20 PM.

  7. #7
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: Macro to find Duplicates

    yes.. But not ID and with any two other columns...

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to find Duplicates

    It's not nearly as elegant:

    Please Login or Register  to view this content.
    Last edited by xladept; 12-01-2014 at 03:28 PM.

+ 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. 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
  2. [SOLVED] VBA Macro to find Duplicates using Ranges
    By Kazper in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2013, 02:13 AM
  3. [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
  4. macro to find duplicates in 1 column
    By vsantoro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2011, 05:20 PM
  5. Find and delete duplicates (macro)
    By famico78 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2009, 09:03 PM

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