👋 Welcome! Introduce yourself and connect with your peers in Education to receive your industry badge.
Formula to count of items in a multi dropdown list
Hi
The drop-down multi select is very nice and useful. I started to use it yesterday, but I need to use the formula =countif(range, criterion).
I want to count how many times a value is repeated in a range that has multi values. I use the formula countif and only count one time a repeated value when the cell have multiple values. I hope I explain well my point.
Luis from PR
Best Answer
-
=COUNTFS(range, CONTAINS("specific text", @cell))
Answers
-
Hi Luis,
I'd recommend using CONTAINS.
Did it work?
Hope that helps!
Have a fantastic day!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
=COUNTFS(range, CONTAINS("specific text", @cell))
-
Wow, my friend, you are my hero today! Thanksssssss
-
Thanks so much
-
Happy to help. I was just giving an example of Andree's solution.
-
Happy to help!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
I'm trying to count the total number of selections that were made in a multi-select column, regardless of the selection made.
Ex. Multi-select options are A, B, C, D
Row 1: Selected B = 1
Row 2: Selected A, C, D = 3
etc.
How would I calculate this?
-
The first thing you need to know is the delimiter that SS uses. It is a line break which is CHAR(10).
From there we can take the total number of characters in the cell and subtract from that the number of characters once the delimiter is removed. Adding 1 to that result will give you how many selections were made.
.
Number of characters in the cell
=LEN([Column Name]@row)
.
Removing the delimiter
SUBSTITUTE([Column Name]@row, CHAR(10), "")
.
Number of characters without delimiter
LEN(SUBSTITUTE([Column Name]@row, CHAR(10), ""))
.
Subtract the second number from the first
=LEN([Column Name]@row) - LEN(SUBSTITUTE([Column Name]@row, CHAR(10), ""))
.
Add 1
=LEN([Column Name]@row) - LEN(SUBSTITUTE([Column Name]@row, CHAR(10), "")) + 1
.
And there you have it.
-
Fantastic! You just allowed me to deleted about 10 helper columns!
-
Haha. That's always a good day. Happy to help!
-
They have recently (a few weeks ago) actually come out with a new function that replaces the LEN - LEN/SUBSTITUTE.
=COUNTM([Multi-Select Column]@row)
-
Hi Mark,
Here's some more info about the new functions.
https://community.smartsheet.com/discussion/two-new-functions-released-countm-has
I hope that helps!
Have a fantastic weekend!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Hi guys! I have a similar situation and I'm trying to use the formulas above. I've got dropdowns for a column where I'm indicating the TYPE of task I'm doing, and I want to be able to count cells that include two specific types of task. I have five or so options, but want to count which ones are P&C AND Valuations.
So far I'm trying AND functions to no avail; =COUNTIF(Type:Type, (CONTAINS "Valuations"), AND(Type:Type, (CONTAINS "P&C"))
The counting I'm doing one type at a time is fine; =COUNTIFS(Type:Type, "P&C")
I'm relatively new to this, so any help would be appreciated!!
-
Hi,
Try something like this.
=COUNTIF(Type:Type; "Valuations") + COUNTIF(Type:Type; "P&C")
The same version but with the below changes for your and others convenience.
=COUNTIF(Type:Type, "Valuations") + COUNTIF(Type:Type, "P&C")
Depending on your country you’ll need to exchange the comma to a period and the semi-colon to a comma.
Did it work?
Best,
Andrée
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives