# Creating a button to identify & remove duplicate rows

**URL:** <https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509>\
**Category:** Ask the Community\
**Created:** [November 20, 2018, 12:48am UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509 "2018-11-20T00:48:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Hitchenson](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_hitchenson/32/9805_2.png) [@Paul\_Hitchenson](https://connect.superhuman.com/u/Paul_Hitchenson)\
**Post date:** [November 20, 2018, 12:48am UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509/1 "2018-11-20T00:48:37Z")

</div>

Hi All.  
@mallika had a great solution to filter and identify duplicate rows in the below thread.

[https://connect.superhuman.com/t/showing-only-the-unique-rows-in-a-table-without-repeats/1466](https://connect.superhuman.com/t/showing-only-the-unique-rows-in-a-table-without-repeats/1466)

I was keen to create a button that removes the duplicate rows. using mallika’s formula, but have com up short, seems like no matter how i modify it, it just deletes everything. If anyone has any ideas it would be greatly appreciated.

Cheers,

Paul.

The formula is below.

> [@Showing only the unique rows in a table without repeats](https://connect.superhuman.com/t/showing-only-the-unique-rows-in-a-table-without-repeats/1466/2):
>
> Table.Filter([Unique Unit Name]=thisRow.[Unique Unit Name]).First()=thisRow

 ![image](https://global.discourse-cdn.com/coda1/original/2X/8/843855308b7d4ec0efac09e34f0fb62057d977d8.png)

---

<div class="post-metadata">

**Author:** ![shishir](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/shishir/32/6017_2.png) [@shishir](https://connect.superhuman.com/u/shishir)\
**Post date:** [November 20, 2018, 5:59am UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509/2 "2018-11-20T05:59:23Z")

</div>

Here’s an example of how to do this: [https://coda.io/d/Example-Remove-Duplicate-Rows\_d-ibl9IOYLo](https://coda.io/d/Example-Remove-Duplicate-Rows_d-ibl9IOYLo)

And here’s a quick illustration of it working:

[https://d2ddoduugvun08.cloudfront.net/items/27123F1r090F0f24230X/Screen%20Recording%202018-11-19%20at%2009.57.51.64%20PM.gif?X-CloudApp-Visitor-Id=1910341(image larger than 4096KB)](https://d2ddoduugvun08.cloudfront.net/items/27123F1r090F0f24230X/Screen%20Recording%202018-11-19%20at%2009.57.51.64%20PM.gif?X-CloudApp-Visitor-Id=1910341)

---

<div class="post-metadata">

**Author:** ![Paul\_Hitchenson](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_hitchenson/32/9805_2.png) [@Paul\_Hitchenson](https://connect.superhuman.com/u/Paul_Hitchenson)\
**Post date:** [November 21, 2018, 12:07am UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509/3 "2018-11-21T00:07:46Z")

</div>

@shishir Amazing thank you so much. This works perfectly. At first i was thinking that it all should be in one super formula attached to the button, but splitting it up into a couple of rows makes it so much easier to digest and is much more illustrative for another editor to come in and manipulate.

Thank you again.

---

<div class="post-metadata">

**Author:** ![Guillaume\_Bardon](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/guillaume_bardon/32/40919_2.png) [@Guillaume\_Bardon](https://connect.superhuman.com/u/Guillaume_Bardon)\
**Post date:** [April 24, 2024, 12:17pm UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509/4 "2024-04-24T12:17:34Z")

</div>

Hi, I would just like to mention that this solution does not relink relations in other tables, it actually breaks the relations that were attached to the 2nd instance of the duplicate.

Not a fully rounded solution unfortunately, if anyone knows a better one it would be super useful 🙂

Sample of the issue:  
 ![20240424-141153_msedge](https://global.discourse-cdn.com/coda1/original/3X/7/1/71f3093080e86283e3e8a5392822755c44f2dcea.png)

Sample doc showing the result of deduping and the broken reference:

```auto
<iframe src="https://coda.io/embed/RJ9LIt7J4N/_suBZq#_lusmd?viewMode=embedplay" width=900 height=500 style="max-width: 100%;" allow="fullscreen"></iframe>

```

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [April 24, 2024, 2:29pm UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509/5 "2024-04-24T14:29:29Z")

</div>

Oh what an old thread got bumped!

@Guillaume_Bardon I once built a ‘fully rounded’ drop-in solution but that one might be an overkill actually 🙂

> [@\[Offer\] fire A template that finds and merges duplicates (premium doc)](https://connect.superhuman.com/t/offer-a-template-that-finds-and-merges-duplicates-premium-doc/27091):
>
> I made a drop-in template that provides a gorgeous interface to find duplicates and merge their data: [ezgif.com-gif-maker (23)] fire Features: Easy to set up (basically just edit two formulas) Auto-merge where possible Combines multi-selects, e.g. tags from contacts You can edit the result column by column You can swap original and duplicate along the way tv Setup & Demo See how easy it is! Setting up takes only 5-20 minutes depending on your skill. [[PREMIUM DOC: Duplicate Fi…](https://www.youtube.com/watch?v=HqM5w5-13s8)

For something simpler you could just remove duplicates like advised here and then resolve broken references similarly to how I did [in this video](https://www.youtube.com/watch?v=VdvuJUnJ5Ro).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Bardon](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/guillaume_bardon/32/40919_2.png) [@Guillaume\_Bardon](https://connect.superhuman.com/u/Guillaume_Bardon)\
**Post date:** [April 25, 2024, 12:49pm UTC](https://connect.superhuman.com/t/creating-a-button-to-identify-remove-duplicate-rows/3509/6 "2024-04-25T12:49:01Z")

</div>

Oh WOW… not only did you bring a solution, you made a [2h video showing how to do it…](https://www.youtube.com/watch?v=DhPDoUfkz48) that is so far above and beyond… that you are officially my new favorite coda Guru Mr Paul Danyliuk…  
🧘 🙏 🪬  
Дякую
