enter image description here

I have a database with thousands of rows and want to remove duplicates but also keep records from earlier in certain conditions. Here is my problem:

Column A will have unique numbers for referals in other forumlas in my Sheet, call this ID of the row.

Column B is the one I want to search for duplicates in.

Column C has a "date"

Column D has a "state"

Column E has a "comment"

Column F has an "Internal state"

  • If duplicate is found in Column B and "Date" and "State" hasnt changed the last row should be deleted.
  • If "Date" and/or "State" has changed i will update the Column C and D in the first entry, then delete the duplicate row. In this case I also want to remove the "Internal State", but only if the "Internal state" has a spesific state, lets say abc.

Here is the script i have found, but dont know how to edit to get the result i want:

enter image description here

  • 1
    Welcome to Web Applications. Please show what you tried and add a brief description of your search efforts as is suggested in How to Ask. – Rubén Feb 26 at 21:15
  • Welcome Morten. Would you please explain what you are expecting by way of an answer. Are you expecting someone to write an entire solution, or to correct some code you have partially developed, or to provide some general guidance so that you can develop your own code, or something altogether different? – Tedinoz Feb 27 at 4:09
  • I have no very little knowledge about javascript, but have found a script to remove duplicates. the problem is that if i write something i Column E og change status it isnt a dupliucate anymore, and i dont know how to keep/merge records. – Morten Mar 3 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.