#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)
Answers
-
@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.
Regards,
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
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!