Checking for Duplicates and then Checking for the highest ID Code.
Hi there!
We use Smart Sheet for tracking multiple components of our department. On one sheet, I want a formula to check for duplicate names and then look at the ID Code Column and I want a box to be checked for any ID Code that isn't the highest of the duplicates.
I have gotten the first part of the formula to work. I have a column where the box is checked if there is a duplicate name. I use the formula below:
=IF(COUNTIF([Contractor Name]:[Contractor Name], [Contractor Name]@row) > 1, 1, 0)
I can't get the second part of the formula to work in where it then looks at the ID Code and does not check the box for the highest ID Code.
Any suggestions would be appreciated!
Best Answer
-
You will need a helper column that pulls in the highest id code for the name on each row.
=MAX(COLLECT([ID Code]:[ID Code], [Contractor Name]:[Contractor Name], @cell = [Contractor Name]@row))
Then the flag formula would look something like this:
=IF([ID Code]@row< [Helper Column]@row, 1)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
=IF(COUNTIF([Contractor Name]7:[Contractor Name]110,[Contractor Name]@row)>1, NOT(MAX([ID Code]7:[ID Code]110,[ID Code]@row))1,0)
I also tried this formula and was returned as formula syntax isn't quite right.
-
You will need a helper column that pulls in the highest id code for the name on each row.
=MAX(COLLECT([ID Code]:[ID Code], [Contractor Name]:[Contractor Name], @cell = [Contractor Name]@row))
Then the flag formula would look something like this:
=IF([ID Code]@row< [Helper Column]@row, 1)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
This did exactly what I needed it to!! Thank you so much for your help!!!!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!