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
- 63.2K Get Help
- 386 Global Discussions
- 212 Industry Talk
- 444 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 132 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 291 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!