Help with #DIVIDE BY ZERO error message
Hello,
Hoping you might be able to assist me with a similar issue I'm experiencing. I've attempted to import a Trello board into Smartsheet for one of my colleagues and I'm getting the same error message, when I view it in grid view on some of the rows.
The formula in question that is currently being used is: =COUNTIF(CHILDREN(), "=1") + "/" + COUNT(CHILDREN()) + " (" + ROUND(COUNTIF(CHILDREN(), "=1") / COUNT(CHILDREN()) * 100) + "%)"
For a bit of context, the formula being used is in a column known as "Complete" and it has checkboxes in but for the all the rows that say "Action / Status" in the "Task Name" column, the #Divide By Zero error message appears.
Please see the screenshot for an idea of what the grid view looks like.
Any ideas/suggestions would be greatly appreciated!?
Comments
-
That's because there are no children rows which returns a zero. You can't divide by zero, so the error gets thrown. Try wrapping your formula in an IFERROR
=IFERROR(current formula, "whatever you want displayed if there is an error")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thank you for replying with you response. I am not the best with formulae sorry, so I've tried to do this but couldn't figure it out.
Through accident, I have managed to fix the cell by outdenting the according row, which has fixed the error message. It now displays as follows: 0/3 (0%). The logic is that it ought to calculate the progress of the children rows below.
Unfortunately, this has now caused a further issue in that it does not appear to be calculating the progress. I've done a screenshot to clarify what I mean here.
Any ideas on how to correct this?
-
Setting the hierarchy back to where you wanted it, what would you want displayed in that row?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
It does appear to be displaying correctly: 0/3 (0%), so I'm happy for it to remain like that.
The issue I'm now having is that it does not appear to be factoring in the children rows below. My understanding is that it should calculate the progress of the children tasks below when they have been completed but after I've ticked them complete and saved, it still displays as "0/3 (0%)".
Is the formula wrong? Any ideas what it might need changing to?
-
Are you leaving the hierarchy as it is in your most recent screenshot?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Do you think I ought not to?
By changing the hierarchy it appears to have got rid of the error message.
-
The hierarchy is entirely up to you.
One way is giving you an error, but the other way is not producing the desired results. Either way there is an issue.
I just need to know which one you want to stick with because the solutions are going to be different.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
I think the preferable option is to have the hierarchy as my understanding is that its aim is to show progress of the children rows underneath 0/3 (0%) - as each one is completed, I'd like for the parent row to show this.
Very much appreciate your help here!
-
Ok. Then we will use something very similar to what you are currently using. The difference is what we will use as our criteria for if one of the child rows is complete. Obviously we cannot say whether or not a box is checked, so we will simply search each of the children cells for the text of "100%".
.
=COUNTIF(CHILDREN(), CONTAINS("100%", @cell)) + "/" + COUNT(CHILDREN()) + " (" + ROUND(COUNTIF(CHILDREN(), CONTAINS("100%", @cell)) / COUNT(CHILDREN()) * 100) + "%)"
.
Give this a try and see how it works for you.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thank you so much!! This has worked - what a relief!!
-
Happy to help!
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 303 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!