Seeking a formula to identify repeat customers
I have a service metric to report how many repeat customers we have and I'm looking to build that via formula in a sheet summary. I have a Customer column that looks something like this:
Bob
Susan
Tim
Susan
Gina
Susan
Tim
If the formula works correctly it would return a result of of 2 as we have 2 repeat customers, Susan and Tim. I'm not looking to count the number of duplicate values, but rather to count the number of values that have duplicate entries.
I've tried several variations of COUNTIF, COUNTIFS, and IF statements to no avail. The AI formula generator hasn't been able to help either, unfortunately. I'd be thankful to anyone who can point me in the right direction!
Best Answer
-
Hi @skemp,
Are you able to modify the sheet structure? If so, one way is to use a "helper" column to track the number of times a customer name is used (this column can be hidden). Next, your summary field can get a count of all the names that appear multiple times.
The new column, which I called "Customer (Helper)" would have this formula:
=COUNTIF(Customer:Customer, =Customer@row)
The Summary field would then have this:
=COUNT(DISTINCT(COLLECT(Customer:Customer, [Customer (Helper)]:[Customer (Helper)], >1)))
Hope this helps,
Dave
Answers
-
Hi @skemp,
Are you able to modify the sheet structure? If so, one way is to use a "helper" column to track the number of times a customer name is used (this column can be hidden). Next, your summary field can get a count of all the names that appear multiple times.
The new column, which I called "Customer (Helper)" would have this formula:
=COUNTIF(Customer:Customer, =Customer@row)
The Summary field would then have this:
=COUNT(DISTINCT(COLLECT(Customer:Customer, [Customer (Helper)]:[Customer (Helper)], >1)))
Hope this helps,
Dave
-
@DKazatsky2 that worked perfectly! Thank you so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 422 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!