From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: Re: Spreadsheet field referencing problem Date: Thu, 01 Oct 2009 10:43:37 +0200 Message-ID: <4AC46BB9.3020702@cs.tu-berlin.de> References: <87tyyjbmkm.fsf@thinkpad.tsdh.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtHH7-00051f-BB for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 04:44:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtHH2-0004y5-II for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 04:44:32 -0400 Received: from [199.232.76.173] (port=58886 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtHH2-0004xt-2a for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 04:44:28 -0400 Received: from mail.cs.tu-berlin.de ([130.149.17.13]:36838) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtHH1-0004nk-Fq for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 04:44:27 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost-12225.cs.tu-berlin.de (Postfix) with ESMTP id 385D733D8E for ; Thu, 1 Oct 2009 10:44:24 +0200 (MEST) In-Reply-To: <87tyyjbmkm.fsf@thinkpad.tsdh.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tassilo Horn , emacs-orgmode@gnu.org Hi Tassilo, one solution would be: | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag | |------------------+-----------+---------------+------------+------------| | | | | | 79000 | |------------------+-----------+---------------+------------+------------| | <2009-10-30 Fri> | 7000 | 0 | 0 | 72000 | | <2009-11-15 Sun> | 0 | 0 | 1000 | 71000 | | <2009-12-15 Tue> | 0 | 0 | 1000 | 70000 | #+TBLFM: $5=@-1 - vsum($2..$4)::@2$5=79000 hth, Stephan Tassilo Horn wrote: > Hi all, > > I have a table like this: > > | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag | > |------------------+-----------+---------------+------------+------------| > | | | | | 79000 | > |------------------+-----------+---------------+------------+------------| > | <2009-10-30 Fri> | 7000 | 0 | 0 | | > | <2009-11-15 Sun> | 0 | 0 | 1000 | | > | <2009-12-15 Tue> | 0 | 0 | 1000 | | > > In the last column "Restbetrag" I want to have a column formula, so that > I get these values: > > | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag | > |------------------+-----------+---------------+------------+------------| > | | | | | 79000 | > |------------------+-----------+---------------+------------+------------| > | <2009-10-30 Fri> | 7000 | 0 | 0 | 72000 | > | <2009-11-15 Sun> | 0 | 0 | 1000 | 71000 | > | <2009-12-15 Tue> | 0 | 0 | 1000 | 70000 | > > So the formula should take the value from the cell above, and substract > the sum of the other values in that row. So I came up with the formula > > #+TBLFM: $5=@-1 - vsum($2..$4) > > but recalculating the table gives that: > > | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag | > |------------------+-----------+---------------+------------+--------------------| > | | | | | Restbetrag | > |------------------+-----------+---------------+------------+--------------------| > | <2009-10-30 Fri> | 7000 | 0 | 0 | Restbetrag - 7000 | > | <2009-11-15 Sun> | 0 | 0 | 1000 | Restbetrag - 8000 | > | <2009-12-15 Tue> | 0 | 0 | 1000 | Restbetrag - 9000 | > > How do I get it right? > > Bye, > Tassilo > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode