+ Reply to Thread
Results 1 to 12 of 12

Identify redundant data, but choose the latest date and delete the other one

  1. #1
    Forum Contributor
    Join Date
    07-04-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    105

    Identify redundant data, but choose the latest date and delete the other one

    Hi guys.


    I have a problem here. I want to identify the redundant records from thousands of data. Specifically, redundant data means the one that have same Serial Number and Operation Number simultaneously. If the formula can identify them, i want it to keep the data with the latest Finish Execution date , and delete the rest of them. But if the latest date also same, just remove the redundancy. Please refer the attachment and u will get what i mean.

    If possible, i prefer the formula to automatically run ( without certain row range) every time i update rows A and B , because i have thousands of data that i need to update everday.


    Thanks in advance. Appreciate ur help.redundant forum.xlsx

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Identify redundant data, but choose the latest date and delete the other one

    hi pyol17, your file title made me laugh a little. not really a good title to attract helpers by labelling our forum redundant eh? haha. to make it automatic, you are probably gonna involve VBA. so i can't help you on that part. but it seems like you need to remove duplicates & Excel 2007 has that function to do that. it's manual each time though. click on any 1 cell within the data. go to Data -> Remove Duplicates. Ensure that "My data has headers" is checked. Deselect Description & Finish Date. Click OK.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    07-04-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Identify redundant data, but choose the latest date and delete the other one

    Yeahh.The filename sounds ugly but i really need one catchy name because my desktop is kind of mess.

    I have tried ur method, but it doesnt work in this case. What i mean with redundant data is two consequence rows that has same Serial No and Operation No. BAsically,they may have same Serial No, but different Operation No can mean they are different data anyway. Only then the redundancy will be deleted automatically.

    So the matter of redundant or not, will be identified by both Serial No and Operation No, not by only of them.

    I hope you gus can help me this.

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Identify redundant data, but choose the latest date and delete the other one

    so to confirm, row 7, 8, 10, 12, 14, 16 & 20 should be deleted? i did a simple macro for it. please see if it's suitable
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Identify redundant data, but choose the latest date and delete the other one

    No need to sort.
    redundant forumWithCode.xlsm

  6. #6
    Forum Contributor
    Join Date
    07-04-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Identify redundant data, but choose the latest date and delete the other one

    Thanks benishiryo and jindon..

    Both ways impressively work anyway even you use different methods.


    So before i close this thread as 'solved' , i got one special request. The finish date is on column D right. So, what if i want to change it to G4. How do i modify the code so the whole formula still works?
    I try to learn the code, but seems nothing much i can understand. So can anyone paste the code and redhighlight the critical part to adjust

    1) change "finish date" column to column G
    2) change "serial no" column to another column
    3) change "operation No " to another column

    Thanks both of you.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Identify redundant data, but choose the latest date and delete the other one

    Adjust
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-04-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Identify redundant data, but choose the latest date and delete the other one

    The code perfectly identify the redundant data, however somehow it does eliminating the whole row with the latest finish date.

    I really need this feature, remove duplicate and keep the data with latest 'finish date'.


    So basically this is the actual worksheet that i'm working on. I have 'red' mark the redundant data with not the latest finish date so you can easily identify them.Then you will know you have solved this problem when you succesful to eliminate the red higlight rows once you run the code.


    Can you help me to fix this.Really appreciate ur help.Thanks in advance.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Identify redundant data, but choose the latest date and delete the other one

    Change to
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-04-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Identify redundant data, but choose the latest date and delete the other one

    ok genius..Its entirely works like how i want..

    i guess this is the last. I try to let some space at top of my worksheet, move the the whole activecell a bit downwards. Cell A2 now move to A10.

    Please Login or Register  to view this content.
    But after i modify this, it doesnt work anymore. Am i wrong or any part that i miss?
    Last edited by Cutter; 07-24-2012 at 09:56 AM. Reason: Added code tags

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Identify redundant data, but choose the latest date and delete the other one

    That's correct and should work.

    Any cell within the data range will get the proper range.

    e.g

    Please Login or Register  to view this content.
    should get the same data range.
    Last edited by Cutter; 07-24-2012 at 09:57 AM. Reason: Added code tags

  12. #12
    Forum Contributor
    Join Date
    07-04-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    105

    Re: Identify redundant data, but choose the latest date and delete the other one

    Thanks dude..You are damn genius.

    Thread solved. Really appreciate your help.

+ 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