Skip to content
Advertisement

how to delete rows where a single column value is duplicated

I need to remove all rows having duplicated title column. Something like:

For example, if five rows have the same title column – four of them shold be deleted.

How to do this?

Advertisement

Answer

If you have a unique column like id or somedate:

This code will keep the row with the minimum id among the duplicates.
See the demo.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement