How would I count the number of occurrences of a name from a list?
So I've got a list of names, many of which are duplicates.
What i'd like to do is to first:
-From the main list, create a second column of unique names with all the duplicates removed
-Have a 'count list which counts how many times each name has occurred.
Like this, but when you populate the Primary column it automatically filters the data for Unique values and Count.
Excel has the 'advanced' feature that can do this, but I'm struggling to duplicate this on Smartsheets.
Thanks.
Answers
-
The Counting is pretty easy. Something like:
=COUNTIF([Primary Column]:[Primary Column], Name@row)
This will go through the whole Primary Column range and count the occurrences of the Name at the row you are currently on. Either copy this formula down or make it a Column formula and it should work on all of the names you have listed.
As for extracting the list of unique names, I would direct you to this older discussion that covers it pretty well.
-
Here is the same formula I am using, however it is not returning the correct values. The issue is that the column (Range 5) contains the name, it does not equal the name. How would I write this formula if I wanted to count how many times a name appears in a field but each field contains several names, not just the one I am searching for?
=COUNTIF({Overall Project directory Range 5}, Name@row)
-
=COUNTIF({Overall Project directory Range 5}, CONTAINS(Name@row, @cell))
-
@David Tutwiler Your fingers were moving too fast with CONTAINS.
=COUNTIF({Overall Project directory Range 5}, CONTAINS(Name@row, @cell))
I do the same thing all the time with COUTNIFS. 🤣
-
@Paul Newcome Ah! I hate when I do that. Thank you for the catch. I'll try to edit it on mine as well.
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!