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
 10.5K Get Help
 62 Global Discussions
 46 Industry Talk
 386 Announcements
 3.5K Ideas & Feature Requests
 54 Brandfolder
 125 Just for fun
 50 Community Job Board
 466 Show & Tell
 40 Member Spotlight
 44 Power Your Process
 28 Sponsor X
 234 Events
 7.3K Forum Archives
Check out the Formula Handbook template!