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
- Customer Resources
- 64.8K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!