Divide by Zero Error
I'm deep over my head in a couple formulas. In the screen grab below you'll see Location and the various formulas that follow:
Count based on sheet: =COUNTIF({ERG MEMBERSHIP EA Location}, @cell = "REMOTE")
Previous Month - count based on sheet: =COUNTIFS({Joined Date}, IFERROR(AND(IFERROR(MONTH(@cell), 0) = MONTH(TODAY()) - 1, IFERROR(YEAR(@cell), 0) = YEAR(TODAY())), AND(IFERROR(MONTH(@cell), 0) = 12, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - 1)), {ERG MEMBERSHIP EA Location}, [Column2]@row)
Current Month - Count based on Sheet: =COUNTIFS({Joined Date}, AND(IFERROR(MONTH(@cell), 0) = MONTH(TODAY()), IFERROR(YEAR(@cell), 0) = YEAR(TODAY())), {ERG MEMBERSHIP EA Location}, [Column2]@row)
MoM% Growth: =SUM(([Column5]74 - [Column4]74) / [Column4]74)
My challenge is that I receive an error in the month by month when previous month and current month are 0. Is there a way to signify 'no growth', when both a previous month and current month are 0? Thank you!
Best Answers
-
=IFERROR(([Column5]74 - [Column4]74) / [Column4]74,"No Growth")
-
This might solve.....
=IFERROR(SUM([Column5]@row - [Column4]@row) / [Column4]@row), 0)
Also note the @row edit to help make the formula more efficient... https://help.smartsheet.com/articles/2476491-create-efficient-formulas-with-at-cell
Kelly Drake (she/her/hers)
STARBUCKS COFFEE COMPANY| business optimization product manager
Answers
-
=IFERROR(([Column5]74 - [Column4]74) / [Column4]74,"No Growth")
-
This might solve.....
=IFERROR(SUM([Column5]@row - [Column4]@row) / [Column4]@row), 0)
Also note the @row edit to help make the formula more efficient... https://help.smartsheet.com/articles/2476491-create-efficient-formulas-with-at-cell
Kelly Drake (she/her/hers)
STARBUCKS COFFEE COMPANY| business optimization product manager
-
Thank you both! these are very helpful!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!