+ Reply to Thread
Results 1 to 5 of 5

Macro to remove duplicate entries basis of different conditions

  1. #1
    Forum Contributor
    Join Date
    08-12-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    147

    Macro to remove duplicate entries basis of different conditions

    Hello Guys,

    I need help in creating a Macro to remove duplicate entries from entire data basis of below requirement:

    Requirement:

    1. Need a Macro which identify the duplicate entries through comparing the values of Column A, B, D and F in Sheet 1.

    2. Macro should delete all duplicate entries if Status Column (Column G) is filled against any duplicate row.

    3. If, Status column is empty against all duplicate entries then macro should delete only the old entries by comparing the Date and Time from Column E.

    For example: If you see the attached sheet then Row No. 2, 3, 4 and 9, 10, 11 (marked as yellow) are duplicates and the Status column is also filled. So, macro should delete the all above 6 rows. Now, the Row No. 5, 6 and 7, 8 are also duplicates but the Status column is empty; so Macro should check for the latest entry through Column E and delete the old duplicate entries which is Row No. 5 and 6.

    The purpose of this Macro is to keep only unique entries in the sheet whose Status column is empty and which is recently added

    Please let me know if need more clarification.

    Thanks,
    MG
    Attached Files Attached Files

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Macro to remove duplicate entries basis of different conditions

    Hi Manish..
    I have a solution... (not up to the mark yet...)
    may be a step forward..

    check the attachment .. and tell me that if the unique cells calculated by me are to be kept or ..
    there is something which I am missing..

    Don't forget to click *
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-12-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    147

    Re: Macro to remove duplicate entries basis of different conditions

    Hello Vikas,

    Thanks for reply.

    May be I had not clarified my requirements properly.

    Please see the attached file for how the data I required or should look after running the Macro.

    Please let me know if you need any more clarification on it.

    Thanks,
    MG
    Attached Files Attached Files

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Macro to remove duplicate entries basis of different conditions

    check the attachment for explanation...



    Don't forget to click *
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-12-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    147

    Re: Macro to remove duplicate entries basis of different conditions

    Hello Vikas,

    I know it is a little bit confusing. Let me try to explain it again.

    What I have to do is, every day I have to fetch this sheet from the system and have to fill the Status column against each unique App ID (in Column A). But, this Sheet contains the duplicate entries.

    Now what I required is, if any App ID contains the Status column filled then Macro should delete the all entries from the sheet (including those duplicate entries of same App ID which have the Status column empty because they are already updated).

    Now there are few duplicate App ID entries against those the Status column has not been updated. In this case Macro should delete the old duplicate entries by comparing the Date & Time value in Column E of same App ID's.

    Now, I will update the Status against the remaining unique (and latest) entries.

    But, to double check the duplicate entries, I need an Macro which comapres all the A, B, D and F Columns (to identify the exact duplicate entries) because there are some duplicate App ID's which have different values in B, D or F Column.

    May be above explanation will help you to understand my previous attached file.

    Thanks for helping me.

    Regards,
    MG

+ 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. Replies: 2
    Last Post: 04-21-2014, 05:20 AM
  2. Need to remove duplicate entries from an index
    By Lacaycer in forum Excel General
    Replies: 10
    Last Post: 04-04-2012, 10:50 AM
  3. Remove Duplicate Entries in List
    By nofzinger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2010, 06:43 PM
  4. How to remove duplicate entries?
    By dorian86 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2007, 12:55 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