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
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives