View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Marcelo Marcelo is offline
external usenet poster
 
Posts: 1,047
Default Dividing by zero

I7=if(i19=0,-0,15,MAX(MIN(((I19-K19)/I19),0.15),-0.15))
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"jvega" escreveu:

Hello,

I have this formula: I7=MAX(MIN(((I19-K19)/I19),0.15),-0.15), where I want
the range to be from -0.15 to 0.15.

However, when I19=0, I obviously get the message that I can't divide by zero.

So, how would I change I7 so that when I19=0, I7 will equal -.15,

BUT, when I19=0, AND K19=0, I7will equal 0.

Thanks for you help, it is much appreciated,

Regards,

JV