#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default 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.



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default 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.





  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default 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.






  #4   Report Post  
Posted to microsoft.public.excel.misc
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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default 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.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
IF statement LaNaveau Excel Worksheet Functions 1 August 27th 05 12:12 AM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 01:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"