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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!