COUNTIF formula help

I'm trying to create a formula that will count if a specific value is in a cell and the formula works as long as the cell only has 1 value in it. But I have some cells that contain more than 1 value, how do I get it to work for those cells?
Ex) There are 4 cells with the word Red. 3 cells with the word Blue and 3 cells with both Red and Blue - so the count for Red should be 7 and the count for Blue should be 6
=COUNTIF([Issues]:[Issues], "Red") - Returns a value of 4
=COUNTIF([Issues]:[Issues], (HAS([Issues]:[Issues], "Red"))) - Returns a value of 0
Best Answer
-
=COUNTIF([Issues]:[Issues], CONTAINS("Red", @cell))
Larry Cummings
https://primeconsulting.com/
Principal Consultant | Prime Consulting Group
Answers
-
=COUNTIF([Issues]:[Issues], CONTAINS("Red", @cell))
Larry Cummings
https://primeconsulting.com/
Principal Consultant | Prime Consulting Group -
Thank you so much!!!!!
-
Happy to help. The @cell functionality was new to me at first, but it is super helpful when you need to establish a range in an argument of the formula prior to establishing the logic argument.
In this scenario, I want to Count any field that CONTAINS "Red", & since I need to establish the "range" argument logic in the COUNTIF formula, when I am providing the "serach_within" logic in the subsequent CONTAINS formula, I simply use @cell.
Larry Cummings
https://primeconsulting.com/
Principal Consultant | Prime Consulting Group -
That makes so much sense, I really appreciate it
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 203 Use Cases
- 515 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 82 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives