Count the number of times a word appears in a column
Hello everybody!
I need help with a formula that I am not sure how to enter for what I am looking for. I am building a dashboard on certain metrics that align with a key result. For this we have several results, two of them being Establish Success and Success.
I need to know the number of projects that align with Establish Success, that one is easy I have been using the below formula:
=COUNTIF(OKR:OKR, CONTAINS("Establish Success", @cell))
That works, however for the Success one, if I use the one above it will give me a result that includes Establish Success and that won't give me accurate data, so I have been using the one below:
=COUNTIF(OKR:OKR, HAS("Success", @cell))
But I just realized that for projects that meet both key results, I am not getting the data, screenshot below:
The above should show 1 as there is one that says Success, even if the project key result also has Establish Success, I am hoping this makes sense.
I have tried FIND but that doesn't seem to work. I could move the mapping over to columns with the name of key results and use a check mark for tracking, but I am thinking there must be a formula that won't require me to change all the settings of the trackers.
Appreciate any help you can provide.
Thanks,
Josue
Best Answer
-
The HAS function requires the range first then the criteria (different then the CONTAINS function).
=COUNTIF(OKR:OKR, HAS(@cell,"Success"))
Answers
-
The HAS function requires the range first then the criteria (different then the CONTAINS function).
=COUNTIF(OKR:OKR, HAS(@cell,"Success"))
-
@Leibel Shuchat https://tenor.com/5o9S.gif
Thank you, thank you! That worked!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!