IFERROR for #DIVIDE BY ZERO
Hi!
I'm calculating the averaged RYG in parent rows that's tied to our Status column. Until the status changes to something other than "Not Started", the parent row displays #DIVIDE BY ZERO. I'm trying to use IFERROR to display blank but I'm getting an #INCORRECT ARGUMENT SET. I'm probably missing a parenthesis somewhere.
Here's my formula:
=IFERROR(IF((COUNTIF(CHILDREN(), "Yellow") + (COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 0.1, "Green", IF((COUNTIF(CHILDREN(), "Yellow") +(COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 1.5, "Yellow", IF((COUNTIF(CHILDREN(), "Yellow") + (COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 2.5, "Blue", "Ideal", ""))))
Any help is appreciated!
Best Answer
-
IFERROR does work for #DIVIDE BY ZERO. Your parenthesis are just off there at the end.
=IFERROR(IF((COUNTIF(CHILDREN(), "Yellow") + (COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 0.1, "Green", IF((COUNTIF(CHILDREN(), "Yellow") +(COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 1.5, "Yellow", IF((COUNTIF(CHILDREN(), "Yellow") + (COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 2.5, "Blue", "Ideal"))), "")
Answers
-
I don't think DIVIDE BY ZERO is classified as an ERROR so IFERROR doesn't work.
I use
IF(COUNT([formula to count whatever the things in my denominator are] >0, [my percentage formula],"N/A")
to put "N/A" where the denominator is not greater than 0, instead of "DIVIDE BY ZERO".
-
Hi @TJordan
Has your question been answered? If so, please click “yes” next to Did this answer the question? on the answer. This will help others locate the information and know this is solved. If not, feel free to ask a follow up.
-
Thank you for the tip @KPH . Unfortunately, it doesn't work. In other posts I've read, I've seen plenty of examples of using IFERROR for DIVIDE by ZERO. I'm still convinced I'm missing or placing parentheses incorrectly.
-
IFERROR does work for #DIVIDE BY ZERO. Your parenthesis are just off there at the end.
=IFERROR(IF((COUNTIF(CHILDREN(), "Yellow") + (COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 0.1, "Green", IF((COUNTIF(CHILDREN(), "Yellow") +(COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 1.5, "Yellow", IF((COUNTIF(CHILDREN(), "Yellow") + (COUNTIF(CHILDREN(), "Blue") * 2)) / COUNT(CHILDREN()) <= 2.5, "Blue", "Ideal"))), "")
-
Thank @Paul Newcome ! That did the trick! I knew it had to do something with the parentheses! Appreciate everyone's help.
-
Happy to help. 👍️
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!