ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Statement (https://www.excelbanter.com/excel-discussion-misc-queries/177912-if-statement.html)

kleivakat

IF Statement
 
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.




Tyro[_2_]

IF Statement
 
=IF(+J2-I2<0,"0","=SUM(J2-I2)")
The "=SUM(J2-I2)" is text.

Try:
=IF(J2-I2<0,0,SUM(J2-I2))

Tyro


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






kleivakat

IF Statement
 
Worked like a charm. Thanks very much.

"Tyro" wrote:

=IF(+J2-I2<0,"0","=SUM(J2-I2)")
The "=SUM(J2-I2)" is text.

Try:
=IF(J2-I2<0,0,SUM(J2-I2))

Tyro


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

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

Bill Helbron

IF Statement
 
Could you please help me with a slightly different version of this issue? I have
a dollar value in cell J133. I also have dollar values in cells J131 and J134.
In cell J136, I want to insert the following:

If J134 is less than the value in J131, then enter a "NO" in cell J136 but if
J134 is = J131, then enter the computed dollar value in cell J136. Thanks!

Bill

On Tue, 26 Feb 2008 11:36:29 -0600, Dave Peterson
wrote:

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.


Tyro[_2_]

IF Statement
 
Not enough info to provide a formla. You say to return the computed dollar
value. What computation?
e.g =IF(J134<J131,"NO",Enter what computed dollar value?) if the computed
dollar value is the difference between J134 and J136
=IF(J134<J131,"NO",J134-J131)

Tyro

"Bill Helbron" wrote in message
...
Could you please help me with a slightly different version of this issue?
I have
a dollar value in cell J133. I also have dollar values in cells J131 and
J134.
In cell J136, I want to insert the following:

If J134 is less than the value in J131, then enter a "NO" in cell J136 but
if
J134 is = J131, then enter the computed dollar value in cell J136.
Thanks!

Bill

On Tue, 26 Feb 2008 11:36:29 -0600, Dave Peterson

wrote:

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.




Bill Helbron

IF Statement
 
I see my error now. Thanks!
Bill

On Tue, 26 Feb 2008 13:44:53 -0800, "Tyro" wrote:

Not enough info to provide a formla. You say to return the computed dollar
value. What computation?
e.g =IF(J134<J131,"NO",Enter what computed dollar value?) if the computed
dollar value is the difference between J134 and J136
=IF(J134<J131,"NO",J134-J131)

Tyro

"Bill Helbron" wrote in message
.. .
Could you please help me with a slightly different version of this issue?
I have
a dollar value in cell J133. I also have dollar values in cells J131 and
J134.
In cell J136, I want to insert the following:

If J134 is less than the value in J131, then enter a "NO" in cell J136 but
if
J134 is = J131, then enter the computed dollar value in cell J136.
Thanks!

Bill

On Tue, 26 Feb 2008 11:36:29 -0600, Dave Peterson

wrote:

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.




All times are GMT +1. The time now is 11:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com