How to use 'countif' with 'contains'
In the attached example, I would like to count all softwares that used 'Dimensions' (either Dimensions only or Dimensions together with other software). Does anyone knows the exact formula for this?
Best Answer
-
Try using the HAS function nested with your countif
EG
=COUNTIF([Softwares Used]:[Softwares Used],HAS(@cell,"Dimensions")
Kind regards
Debbie Sawyer - Chief Smartsheet Solutions Officer (CSSO)
Answers
-
Try using the HAS function nested with your countif
EG
=COUNTIF([Softwares Used]:[Softwares Used],HAS(@cell,"Dimensions")
Kind regards
Debbie Sawyer - Chief Smartsheet Solutions Officer (CSSO)
-
Hi Jef Snyders,
You can try the below formula -
To count all the elements in the cell, I used “COUNTM”.
=IF(CONTAINS("Dimensions", [Softwares used]@row), COUNTM([Softwares used]@row), " ")
Thank you,
Shubham Umale
Associate - Smartsheet, , Ignatiuz Software
-
hi @Debbie Sawyer - this completely answers my questions. Thanks so much!
-
Hi @Shubham, I am trying this formula in my metric sheet, but it is not working properly. Do you mean I first need to create this 'count' column in my project sheet?
-
Hi Jef Snyders,
I have created the formula to count the elements row-wise. Yes, you need to create a column where you will apply the formula. Alternatively, if you prefer to calculate within a single cell, use the formula suggested by @Debbie Sawyer
Thank you,
Shubham Umale
Associate - Smartsheet, Ignatiuz Software
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 405 Global Discussions
- 216 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!