ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete duplicates based on time (https://www.excelbanter.com/excel-programming/443851-delete-duplicates-based-time.html)

Zuzeppeddu

Delete duplicates based on time
 
Hi
I have a spreadsheet with two columns. Col1 contains duplicate
records. These duplicates can be two or three or more. Col1 only
contains duplicates i.e. it doesn't have any unique records as I have
filtered them out.

Col2 contains date and time. I want to write a script which would
enable me to delete those duplicates where time difference is less
than or equal to 15 minutes. If it is a pair, one record gets deleted.
It doesn't matter which one. If there are two or more duplicates, one
of them remains and the rest get deleted.

Could anyone please help me write this script?

Thanks

Don Guillett Excel MVP

Delete duplicates based on time
 
On Nov 5, 2:46*pm, Zuzeppeddu wrote:
Hi
I have a spreadsheet with two columns. Col1 contains duplicate
records. These duplicates can be two or three or more. Col1 only
contains duplicates i.e. it doesn't have any unique records as I have
filtered them out.

Col2 contains date and time. I want to write a script which would
enable me to delete those duplicates where time difference is less
than or equal to 15 minutes. If it is a pair, one record gets deleted.
It doesn't matter which one. If there are two or more duplicates, one
of them remains and the rest get deleted.

Could anyone please help me write this script?

Thanks


Probably not too difficult with a looping macro from the bottom up.
"If desired, send your file to dguillett @gmail.com I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."


All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com