| View previous topic :: View next topic |
| Author |
Message |
AngryAndy Newbie

Joined: 25 Feb 2010 Posts: 4
|
Posted: Thu Feb 25, 2010 7:08 am Post subject: Display a negative result as zero |
|
|
Hi,
my 1st post im fairly green to spreadsheets and I have the following problem.
I have a stock count , and a order amount and I want the disply to tell me how many more I need , but I want a negative value to just display 0
So here is my formula at the momment:
=D3-'Stock Minerals'.B3
This is Amount needed minus stock count =
If the amount needed is less than what I have in stock I get a negative but I want it to say if result = <0 then show 0.
Thanks in advance for any suggestions. |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1851 Location: Sydney, Australia
|
Posted: Thu Feb 25, 2010 7:49 am Post subject: |
|
|
Maybe...
| Code: | | =IF('Stock Minerals'.B3>=D3;0;D3-'Stock Minerals'.B3) |
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
AngryAndy Newbie

Joined: 25 Feb 2010 Posts: 4
|
Posted: Thu Feb 25, 2010 8:39 am Post subject: |
|
|
| Cool thanks alot that worked perfectly |
|
| Back to top |
|
 |
Ed Super User

Joined: 28 May 2003 Posts: 1040
|
Posted: Thu Feb 25, 2010 10:14 am Post subject: |
|
|
Alternatively you could do | Code: | | =max(D3-'Stock Minerals'.B3;0) |
|
|
| Back to top |
|
 |
|