avoid divide by zero error
Summary:
I'm trying to avoid a divide by zero error, but even when I use a formula to do so it still seems to manifest - any ideas?
Content (please ensure you mask any confidential information):
So Cell A 3 has a figure I want to divide, cell A 4 has a figure I want to divide by, but either or both might be zero / empty.
I tried using IFTHEN([A, 3] <> 0, [A, 3], 1) / IFTHEN([A, 4] <> 0, [A, 4], 1) - sure it might give a spurious result but it errors at run time when logically it should be evaluating to 1 / 1. When I tried nesting the IFTHENs like thus, it states the [A, 3] / [A, 4] is an error in the formula - this errors on syntax check; - IFTHEN([A, 3] <> 0, IFTHEN([A, 4] <> 0 ,[A, 3] / [A, 4] ,0) ,0)
Tagged:
0