Using "Contains" or Wildcard to search for duplicates
I am currently using COUNTIFS to find and flag duplicate persons by a match of both last and first name with this formula:
=IF([Last Name]@row <> "", IF(COUNTIFS([Last Name]:[Last Name], =[Last Name]@row, [First Name]:[First Name], =[First Name]@row) > 1, 1), false)
I want to change it so that it flags fields containing the same first and last name. So for example, Jane Smith and Jane Smithson would be flagged as duplicates. I'm doing this because we are accepting records from users that sometimes have errors in them (an extra space after the name for example, or a hyphenated name where our other record only includes one part of it.) I want to catch those. What is the best way to do this?
Best Answer
-
=IF([Last Name]@row <> "", IF(COUNTIFS([Last Name]:[Last Name], CONTAINS([Last Name]@row, @cell), [First Name]:[First Name], CONTAINS([First Name]@row, @cell)) > 1, 1), false)
Answers
-
=IF([Last Name]@row <> "", IF(COUNTIFS([Last Name]:[Last Name], CONTAINS([Last Name]@row, @cell), [First Name]:[First Name], CONTAINS([First Name]@row, @cell)) > 1, 1), false)
-
Thank you! That works great! I don't have a good handle on how to use @cell, I think that was tripping me up.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.2K Get Help
- 358 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 135 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 444 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!