replaced Divided by zero message with the 100%
Hello,
I'm calculating the difference in a number of cases between various years like in the screenshot, but when for a particular year there is 0 cases, i get Divided by zero message.
Here is the example of the formula: =([2022]@row  [2021]@row) / [2021]@row.
I'm just replacing the years depending on which year I need to compare.
are.
I understand why this error mathematically, but can i replace the error message with "100%" to show an increase or "0" if both years have 0 in them and apply this formula to all the years even if the cases are not 0  to keep the formula unified?
thank you
Best Answer

You would use an IFERROR function.
=IFERROR(original formula, output when original formula errors)
Answers

You would use an IFERROR function.
=IFERROR(original formula, output when original formula errors)

thank you, @Paul Newcome !

Happy to help. 👍️
Help Article Resources
Categories
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 63.7K Get Help
 406 Global Discussions
 216 Industry Talk
 456 Announcements
 4.7K Ideas & Feature Requests
 141 Brandfolder
 136 Just for fun
 57 Community Job Board
 459 Show & Tell
 31 Member Spotlight
 1 SmartStories
 297 Events
 37 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!