# IFERROR for #DIVIDE BY ZERO

Options
✭✭

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!

Tags:

• ✭✭✭✭✭✭
Options

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"))), "")

• ✭✭✭✭✭✭
edited 11/01/23
Options

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".

• ✭✭✭✭✭✭
Options

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.

• ✭✭
Options

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.

• ✭✭✭✭✭✭
Options

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"))), "")

• ✭✭
Options

Thank @Paul Newcome ! That did the trick! I knew it had to do something with the parentheses! Appreciate everyone's help.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!