Thread: IF Statement
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default IF Statement

I'd use:
=IF(J2<I2,0,J2-I2)
or even:
=MAX(0,J2-I2)


kleivakat wrote:

I'm trying to put a formula in the cell that runs a formula, and if hte
result is less than zero, enter zero; if the result is not less than zero,
enter the result. Here's what I have so far:

=IF(+J2-I2<0,"0","=SUM(J2-I2)")

The first part works, i.e., if the number is less than zero a zero appears,
but the second part doesn't report the result if the number is greater than
zero.

Thanks for any help.


--

Dave Peterson