#divide by zero error

I'm trying to create a column formula, but i get divide by zero error in the parent cell. I want the parent cell to be blank, but the formula will populate an answer in the children row. Is that possible? Formula is =AVG([Sep 2022]@row:[Dec 2022]@row)


  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    edited 09/20/22

    @Allin You can throw an IFERROR in front of the formula that will stifle error messages:

    =IFERROR(AVG([Sep 2022]@row:[Dec 2022]@row), "")

    or you can prevent errors altogether by restricting this to child rows:

    =IF(COUNT(ANCESTORS()) > 0, AVG([Sep 2022]@row:[Dec 2022]@row))

    This will only run the formula if the row has ancestors, meaning it's not a parent row. You can increase the number value in the count part of the formula if your parent rows are lower down in the hierarchy.


    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!