how to use COUNTM with exceptions
Dear Community,
Can someone please help me on the below formula?
I am using this formula to get the total tasks in column Total Task but I don't want to consider Hours element so if we select other elements along with the Hours the total should be counting all the other elements + number of addtional task except the Hours element.
=COUNTM([Task Type]@row) + ([Additional Task]@row)
Best Answer
-
There are a couple ways to do this! Since you're only looking for 1 value ("Hours") I would personally use an IF statement to say that IF that cell HAS "Hours", -1.
Try this:
=IF(HAS([Task Type]@row, "Hours"), COUNTM([Task Type]@row) - 1, COUNTM([Task Type]@row)) + [Additional Task]@row
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Answers
-
There are a couple ways to do this! Since you're only looking for 1 value ("Hours") I would personally use an IF statement to say that IF that cell HAS "Hours", -1.
Try this:
=IF(HAS([Task Type]@row, "Hours"), COUNTM([Task Type]@row) - 1, COUNTM([Task Type]@row)) + [Additional Task]@row
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
Hi Genevieve,
This is perfect what I was looking for. Thank you so much for your help!
Thanks,
Aatish
-
I'm glad I could help! 🙂
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.3K Get Help
- 446 Global Discussions
- 144 Industry Talk
- 478 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 151 Just for fun
- 72 Community Job Board
- 490 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!