Duplicate Checker based on multiple conditions
Hello, I have a duplicate checker formula that was working perfectly until recently..
The recent change was that we started getting phone numbers in different formats (see screenshot).
Here's the formula that has been working perfectly: =IFERROR(IF(LEN([Person - Phone]@row) = 0, "", IF(COUNTIFS([Person - Phone]:[Person - Phone], [Person - Phone]@row, [Deal - Title]:[Deal - Title], [Deal - Title]@row, [Person - Email]:[Person - Email], [Person - Email]@row) = 1, 0, 1)), 0)
Now the issue is that, anytime a phone number is added that is in the format of +1 for country code, the duplicate flag is automatically checked. I've tried a few different things but can't seem to get it to work properly.
Thank you
Best Answer
-
Seems as though when you pass in the [Person - Phone]@row into the COUNTIF function as a criteria it converts it to the value as a number (not comparing text), so "+1814552654" becomes 1814552654.
Then when it loops through your column it is keeping it as a text value of "+1814552654". It will therefore return a count of 0.
In your formula if the count is not 1 then it returns 1 and your duplicate flag is checked.
The best way to fix this is to make sure that every time a phone number is added with the + sign in the beginning it should also have something else besides the numbers (e.g. a parentheses or a dash sign).
Answers
-
Seems as though when you pass in the [Person - Phone]@row into the COUNTIF function as a criteria it converts it to the value as a number (not comparing text), so "+1814552654" becomes 1814552654.
Then when it loops through your column it is keeping it as a text value of "+1814552654". It will therefore return a count of 0.
In your formula if the count is not 1 then it returns 1 and your duplicate flag is checked.
The best way to fix this is to make sure that every time a phone number is added with the + sign in the beginning it should also have something else besides the numbers (e.g. a parentheses or a dash sign).
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!