I want to write a formula that detects duplicate names.
If there is a duplicate in the Name column, I want it to merge the 'Event' values into the 'Event History' row.
Best Answer
-
If you want all lines to have the complete list....
=JOIN(Collect([Event]:[Event], [Name]:[Name], [Name]@row),";")
If you want the new line to have everything prior to it + current event...
You will need an Auto Number column (e.g., RowID) and use.
=IF(Count(Collect([Event History]:[Event History], [Name]:[Name], [Name]@row), [RowID]:[RowID], <= [RowID]@row)>1 , Index(Collect([Event History]:[Event History], [Name]:[Name], [Name]@row, [RowID]:[RowID], <= [RowID]@row), Count(Collect([Event History]:[Event History], [Name]:[Name], [Name]@row, [RowID]:[RowID], <= [RowID]@row)-1) + ";" + [Event]@row , [Event]@row)
Hope that heps!
Answers
-
Dear David,
Please Add new column as a "Duplicate Check" and enter below formula,
=IF(COUNTIFS([Name]:[Name], [Name]@row, [Name]:[Name], NOT(ISBLANK(@cell))) > 1, 1)
Apply conditional formatting on Name column, check if Duplicate Check column = 1 then change the color to get notice.
Check below snapshot
-
I hope this will help you to resolve duplicate check.
-
Thank you Ibrahim but this does not merge the data.
If the name column has any matches, I want the Event History column to display, in the screenshot example, all event data form Jim John so in the Event History column, it would show GDC 2023 (from line 1) and GDC 2024 (from line 3). So, merge data from the Event column into Event History if the Name column has duplicates.
-
If you want all lines to have the complete list....
=JOIN(Collect([Event]:[Event], [Name]:[Name], [Name]@row),";")
If you want the new line to have everything prior to it + current event...
You will need an Auto Number column (e.g., RowID) and use.
=IF(Count(Collect([Event History]:[Event History], [Name]:[Name], [Name]@row), [RowID]:[RowID], <= [RowID]@row)>1 , Index(Collect([Event History]:[Event History], [Name]:[Name], [Name]@row, [RowID]:[RowID], <= [RowID]@row), Count(Collect([Event History]:[Event History], [Name]:[Name], [Name]@row, [RowID]:[RowID], <= [RowID]@row)-1) + ";" + [Event]@row , [Event]@row)
Hope that heps!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!