# Need Help with Invalid Operation

edited 08/19/21

I'm getting Invalid Operation with this formula since the division equation is dividing by zero. How do I fix this so that it shows like "0 of 0 (0%)". If this isn't possible then I'd like to have "Not Yet Started" as the text entered.

=COUNTIF(CHILDREN(), >0) + " of " + [Clock In Location]@row + " (" + (ROUND(COUNTIF(CHILDREN(), >0) / (COUNT(CHILDREN([Clock In Location]1)) / 100)) + "%)" + "")

• ✭✭✭✭✭✭

You would want to incorporate an IFERROR like so...

=COUNTIF(CHILDREN(), >0) + " of " + [Clock In Location]@row + " (" + IFERROR((ROUND(COUNTIF(CHILDREN(), >0) / (COUNT(CHILDREN([Clock In Location]1)) / 100)), 0) + "%)" + "")

• Thanks for the response. I'm getting UNPARSEABLE with your formula. I'm not great with formulas so it's hard for me to tell where it's wrong.

• ✭✭✭✭✭✭

Are you able to provide a screenshot of the formula in the sheet similar to the screenshot below?

• ✭✭✭✭✭✭

My apologies. I was so focused on including the IFERROR that I didn't check the rest of the formula for syntax. Give this a go.

=COUNTIF(CHILDREN(), >0) + " of " + [Clock In Location]@row + " (" + IFERROR(ROUND((COUNTIF(CHILDREN(), >0) / COUNT(CHILDREN([Clock In Location]1))) * 100), 0) + "%)"

• That'll do it! Thank you for the help!

• ✭✭✭✭✭✭

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!