IF formula??

  • Thread starter Thread starter Nan
  • Start date Start date
N

Nan

I have data in cell B7 and C7. If B7=0 and C7>0, I want my result to b
100%. If B7=0 and C7=0 I want my result to be 0%. Otherwise, I want m
result to be C7/B7.

I got this far IF(AND(B7=0,C7=0),0,C7/B7).

Any ideas how to do this?
 
Nan

=IF(AND(B7=0,C7=0),0,IF(AND(B7=0,C7>0),1,C7/B7))

and format the cell as percentage

Regards

Trevor
 
Of course that doesn't cater for the condition where B7 is 0 and C7 is
negative, in which case you will get #DIV/0!

Maybe that doesn't happen ?


Trevor Shuttleworth said:
Nan

=IF(AND(B7=0,C7=0),0,IF(AND(B7=0,C7>0),1,C7/B7))

and format the cell as percentage

Regards

Trevor
 
I have data in cell B7 and C7. If B7=0 and C7>0, I want my result to be
100%. If B7=0 and C7=0 I want my result to be 0%. Otherwise, I want my
result to be C7/B7.

Would this work, assuming your data is non-negative?

=IF(B7=0,SIGN(C7),C7/B7)

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =

<snip>
 
Back
Top