OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Display a negative result as zero

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
AngryAndy
Newbie
Newbie


Joined: 25 Feb 2010
Posts: 4

PostPosted: Thu Feb 25, 2010 7:08 am    Post subject: Display a negative result as zero Reply with quote

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
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Thu Feb 25, 2010 7:49 am    Post subject: Reply with quote

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
View user's profile Send private message
AngryAndy
Newbie
Newbie


Joined: 25 Feb 2010
Posts: 4

PostPosted: Thu Feb 25, 2010 8:39 am    Post subject: Reply with quote

Cool thanks alot that worked perfectly
Back to top
View user's profile Send private message
Ed
Super User
Super User


Joined: 28 May 2003
Posts: 1041

PostPosted: Thu Feb 25, 2010 10:14 am    Post subject: Reply with quote

Alternatively you could do
Code:
=max(D3-'Stock Minerals'.B3;0)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group