Sorry for not being completely clear in what I have ask.

When in A1 there is 1.61 and in B1 there is 1.36.  In C1 the original
formula =A1-B1)/B1 gives the answer of 18%.  The formula =IF(A1-B1 <
0;0;A1-B1) gives the wrong answer of 25% in C1

When in A1 there is 23 and in B1 there is 33   In C1 the original formula
=A1-B1)/B1 gives the answer of -30%.  The formula =IF(A1-B1 < 0;0;A1-B1)
gives the wrong answer of 0% in C1

If there is a negative number in either A1 or B1, then C1 should be empty
(C1 should not have a 0% in it)

On Sat, May 30, 2009 at 9:08 PM, Keith N. McKenna <[email protected]
> wrote:

> Walter Hildebrandt wrote:
>
>> In Calc I am using the following formula in cell C1
>>
>> =A1-B1)/B1
>>
>> Is there some way to get an empty C1 cell when there is a negative number
>> in
>> either A1 or B1?
>>
>>  Walter;
>    Put this if statement into cell C1. =IF(A1-B1 < 0;0;A1-B1) which says If
> the difference of A1-B1 is less than 0; C1 = zero; else C1 = A1-B1
>
> Hope this helps
> Keith
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to