Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Setting any negative number to zero

Thanks. here is my original formula:

=IF((J10-3000000)=2000001,30000,0.015*(J10-3000000))


"Mike Fogleman" wrote:

=IF(A1-B1<0,0,A1-B1)
If you had supplied your formula, I could have given the full answer. This
would become part of your original formula.

Mike F
"kim" wrote in message
...
I have an IF function and I want to add that if the end result ends up
beign
a negative number, it should be set it to zero rather than the negative
number. But I don't know how to do that in conjunction with an already
complete If statement. Any help is much appreciated. Thank you




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Setting any negative number to zero

Try this...

=IF((J10-3000000)=2000001,30000,MAX(0,0.015*(J10-3000000)))

--
Rick (MVP - Excel)


"kim" wrote in message
...
Thanks. here is my original formula:

=IF((J10-3000000)=2000001,30000,0.015*(J10-3000000))


"Mike Fogleman" wrote:

=IF(A1-B1<0,0,A1-B1)
If you had supplied your formula, I could have given the full answer.
This
would become part of your original formula.

Mike F
"kim" wrote in message
...
I have an IF function and I want to add that if the end result ends up
beign
a negative number, it should be set it to zero rather than the negative
number. But I don't know how to do that in conjunction with an already
complete If statement. Any help is much appreciated. Thank you





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Setting any negative number to zero

Hi. Perhaps another option...

= Max(0, Min(30000, 0.015*(J10 - 3000000)]))

= = =
HTH
Dana DeLouis


kim wrote:
Thanks. here is my original formula:

=IF((J10-3000000)=2000001,30000,0.015*(J10-3000000))


"Mike Fogleman" wrote:

=IF(A1-B1<0,0,A1-B1)
If you had supplied your formula, I could have given the full answer. This
would become part of your original formula.

Mike F
"kim" wrote in message
...
I have an IF function and I want to add that if the end result ends up
beign
a negative number, it should be set it to zero rather than the negative
number. But I don't know how to do that in conjunction with an already
complete If statement. Any help is much appreciated. Thank you



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Setting any negative number to zero

= Max(0, Min(30000, 0.015*(J10 - 3000000)]))

Oops! I forgot that this is my preferred technique...

=MEDIAN(0,0.015*(J10-3000000), 30000)

= = =
HTH
Dana DeLouis


Dana DeLouis wrote:
Hi. Perhaps another option...

= Max(0, Min(30000, 0.015*(J10 - 3000000)]))

= = =
HTH
Dana DeLouis


kim wrote:
Thanks. here is my original formula:

=IF((J10-3000000)=2000001,30000,0.015*(J10-3000000))


"Mike Fogleman" wrote:

=IF(A1-B1<0,0,A1-B1)
If you had supplied your formula, I could have given the full answer.
This would become part of your original formula.

Mike F
"kim" wrote in message
...
I have an IF function and I want to add that if the end result ends
up beign
a negative number, it should be set it to zero rather than the negative
number. But I don't know how to do that in conjunction with an already
complete If statement. Any help is much appreciated. Thank you


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
Change negative sign from end of number to the beginning of the number. GORDON SCALES via OfficeKB.com Excel Programming 3 January 30th 05 08:05 AM
2003= negative number&2004= negative number How Do I Calculate gro Jason Excel Worksheet Functions 1 January 14th 05 05:24 PM
Compare/match positve number against negative number? Kobayashi[_56_] Excel Programming 2 November 19th 04 09:11 PM
Compare/match positve number against negative number? Kobayashi[_55_] Excel Programming 1 November 18th 04 02:47 PM
Will setting Saved = True in Workbook_Open have a negative effect? Michael Purcell Excel Programming 1 February 19th 04 05:36 PM


All times are GMT +1. The time now is 09:49 PM.

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"