View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_640_] Rick Rothstein \(MVP - VB\)[_640_] is offline
external usenet poster
 
Posts: 1
Default Dividing by zero

Try this formula instead of the one you posted...

=IF(I19=0,-0.15,MAX(MIN(((I19-K19)/I19),0.15),-0.15))

Rick


"jvega" wrote in message
...
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