replaced Divided by zero message with the 100%


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.


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


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!