Hi everyone!
Today's problem is related to a division by zero situation.
I use the formula
=ROUND(((((D3) - (C3)) / (C3)) * 100), 2)
in a cell, to calculate a percentage of price increase from the month before.
Sometimes the result of the formula may be a division by zero, (like C3 is zero or still absent) and excel show me the #DIV/0! message in the cell.
I am trying to find a way for showing a zero or nothing instead of the #DIV/0! .
What get complicated to me is that i am inserting the formula in the cell via VBA, like this:
.Offset(RowCount, 15).Formula = "=ROUND(((((D" & RowCount + 1 & ") - (C" & RowCount + 1 & ")) / (C" & RowCount + 1 & ")) * 100), 2)"
It was already a challenge to me to achieve the above....
Really need some basic help here....
Bookmarks