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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
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! 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!