Highlight duplicate values with a criteria within multiple select column
Answers
-
@Leibel S Rows are inserted on the top
-
I added something to my duplicate formula to account for subsequent rows all being marked duplicate.
I also revised the formula to work per @Sander K system of rows being added on top.
- LINE-ID: SYSTEM AUTO NUMBER
- ROW#: =MATCH([Row ID]@row, [Row ID]:[Row ID], 0
- Collect Location: (multi select column) =JOIN(COLLECT(Location:Location, [Task ID]:[Task ID], [Task ID]@row, [ROW#]:[ROW#], >=[ROW#]@row), CHAR(10))
- Location Count: =COUNTM(Location@row)
Formula for duplicate formula:
=IF(MAX(COLLECT([ROW#]:[ROW#], [Task ID]:[Task ID], [Task ID]@row)) = [ROW#]@row, 0, IF(SUM(SUMIFS([Location Count]:[Location Count], [Task ID]:[Task ID], [Task ID]@row, [ROW#]:[ROW#], >=[ROW#]@row) + SUM(COUNTM(INDEX([Collect Location]:[Collect Location], MIN(COLLECT([ROW#]:[ROW#], [ROW#]:[ROW#], >[ROW#]@row, [Task ID]:[Task ID], [Task ID]@row)))) - SUMIFS([Location Count]:[Location Count], [Task ID]:[Task ID], [Task ID]@row, [ROW#]:[ROW#], >[ROW#]@row))) > COUNTM([Collect Location]@row), 1, 0))
If you need it the above formulas to work with rows being added to the bottom then the formula would be as per below:
- LINE-ID: SYSTEM AUTO NUMBER
- ROW#: =MATCH([Row ID]@row, [Row ID]:[Row ID], 0
- Collect Location: (multi select column) =JOIN(COLLECT(Location:Location, [Task ID]:[Task ID], [Task ID]@row, [ROW#]:[ROW#], <=[ROW#]@row), CHAR(10))
- Location Count: =COUNTM(Location@row)
Duplicate Formula:
=IF(MIN(COLLECT([ROW#]:[ROW#], [Task ID]:[Task ID], [Task ID]@row)) = [ROW#]@row, 0, IF(SUM(SUMIFS([Location Count]:[Location Count], [Task ID]:[Task ID], [Task ID]@row, [ROW#]:[ROW#], <=[ROW#]@row) + SUM(COUNTM(INDEX([Collect Location]:[Collect Location], MAX(COLLECT([ROW#]:[ROW#], [ROW#]:[ROW#], <[ROW#]@row, [Task ID]:[Task ID], [Task ID]@row)))) - SUMIFS([Location Count]:[Location Count], [Task ID]:[Task ID], [Task ID]@row, [ROW#]:[ROW#], <[ROW#]@row))) > COUNTM([Collect Location]@row), 1, 0))
Please let me know if this does not work.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!