Count dropdown and %
Hi Community,
I am defining the following formula to count how many children cells are blank out of the total number of children cells along with the associated percentage value. In a Team schedule sheet this will count how many time slots are still available.
The cell visualisation would be: 16/25 (64%)
The problem is the second part of the formula.It should count the total number of cells, while the formula below returns only the number of non blank cells.
=COUNTIF(CHILDREN(), "") + "/" + COUNT(CHILDREN()) + " (" + ROUND(COUNTIF(CHILDREN(), "") / COUNT(CHILDREN()) * 100) + "%)"
Can anybody please help with the syntax?
Additionally, if possible, I would add in the formula the word "available" to have this final visualisation: Available 16/25 (64%)
Many thanks for taking time and help me with this enquiry.
Best Answer
-
Try this...
="Available " + COUNTIF(CHILDREN(), "") + "/" + COUNT(CHILDREN()) + " (" + ROUND(COUNTIF(CHILDREN(), "") / COUNTIF(CHILDREN(), OR(@cell = "", @cell <> "")) * 100) + "%)"
Answers
-
Try this...
="Available " + COUNTIF(CHILDREN(), "") + "/" + COUNT(CHILDREN()) + " (" + ROUND(COUNTIF(CHILDREN(), "") / COUNTIF(CHILDREN(), OR(@cell = "", @cell <> "")) * 100) + "%)"
-
Yes! Thank you Paul,
I have used your input and edited(in bold) the formula to make it work for my purposes:
="Available " + COUNTIF(CHILDREN(), "") + "/" + COUNTIF(CHILDREN(), OR(@cell = "", @cell <> "")) + " (" + ROUND(COUNTIF(CHILDREN(), "") / COUNTIF(CHILDREN(), OR(@cell = "", @cell <> "")) * 100) + "%)"
It works. Very grateful to you once again.
Have a great day and thank you!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K 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
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!