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

Calculate min 0

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Mark
Guest





PostPosted: Thu Jan 29, 2004 9:22 am    Post subject: Calculate min 0 Reply with quote

Hi all,
i just try to calculate the following in a writer table:
Cell A1: x
Cell A2: y
Cell A3: if x-y is negative then 0 else x-y

Is there any Chance to get it ?

Thank a Lot

Mark
Back to top
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Thu Jan 29, 2004 9:43 am    Post subject: Reply with quote

enter this formula in A3 :

=IF(A1>A2;A1-A2;0)
Back to top
View user's profile Send private message
Mark
Guest





PostPosted: Thu Jan 29, 2004 10:02 am    Post subject: Works fine in Calc but nt in Writer Reply with quote

Hi drench,

thanks a lot for your fast help.
This works fine in calc (german version with "Wenn" instead of "IF") but it's not working in the writer.

Any more idea ?

Thanks

Mark
Back to top
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Thu Jan 29, 2004 10:57 am    Post subject: Reply with quote

sorry about that, it is early in the morning!
I just put a calc table in the document when I want to do calculations, the syntax in writer formula is a bit inflexible.
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Thu Jan 29, 2004 11:20 am    Post subject: Reply with quote

Try the formula
=(<A1> > <A2>)*(<A1>-<A2>)*-1
it produces the 'right' answer.
Now the big question WHY???
The first term results in 1 or 0 (true/false) ; the second term produces the difference; why does multiply those 2 in the formula result in a negative?
Back to top
View user's profile Send private message
Mark
Guest





PostPosted: Thu Jan 29, 2004 11:59 am    Post subject: Genius Reply with quote

Hi dfrench,

that's a great idea !
But i don't think it's realy early - it's late here (21.00) and i'm still on work i must be crazy !

Thanks a lot.

The next time I can help i will do (I'm knew on oo, but i'm good in Hardware and Network).
I see - oo suport is much better than M$.

Cu

Mark
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer 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