From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Burtzlaff Subject: Re: Question on spreadsheet formula Date: Sat, 26 Sep 2009 05:34:09 +0200 Message-ID: <20090926053409.0f65c53b.andy13@gmx.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrO2q-0001gN-Nx for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 23:34:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrO2m-0001gA-9R for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 23:34:00 -0400 Received: from [199.232.76.173] (port=45825 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrO2m-0001g7-6x for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 23:33:56 -0400 Received: from mail.gmx.net ([213.165.64.20]:54628) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MrO2l-00040R-LV for emacs-orgmode@gnu.org; Fri, 25 Sep 2009 23:33:56 -0400 In-Reply-To: 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: RC Cc: emacs-orgmode@gnu.org Hi, you could rewrite the formula using vertical sums: |-----+------+------+-------| | No. | P | E | B | |-----+------+------+-------| | 1 | 5000 | 2000 | 3000 | | 2 | 7000 | 1000 | 9000 | | 3 | 5000 | 1000 | 13000 | #+TBLFM: $4=vsum(@-I$2..@0$2)-vsum(@-I$3..@0$3) HTH Andreas On Sat, 26 Sep 2009 03:08:11 +0000 (UTC) RC wrote: > Hi, > On applying the column formula on the table shown below: > |-----+------+------+----------| > | No. | P | E | B | > |-----+------+------+----------| > | | | | 0 | > | 1 | 5000 | 2000 | | > | 2 | 7000 | 1000 | | > | 3 | 5000 | 1000 | | > #+TBLFM: $4=@-1$4+$2-$3 > > I get: > |-----+------+------+-----------| > | No. | P | E | B | > |-----+------+------+-----------| > | | | | B | > | 1 | 5000 | 2000 | B + 3000 | > | 2 | 7000 | 1000 | B + 9000 | > | 3 | 5000 | 1000 | B + 13000 | > #+TBLFM: $4=@-1$4+$2-$3 > > When what I would like is: > |-----+------+------+-------| > | No. | P | E | B | > |-----+------+------+-------| > | | | | 0 | > | 1 | 5000 | 1000 | 3000 | > | 2 | 5000 | 1000 | 9000 | > | 3 | 5000 | 1000 | 13000 | > #+TBLFM: $4=@-1$4+$2-$3 > > Is there a way I can restrict application of the column formula to below the > horizontal line. > Thanks, > RC > > > > > _______________________________________________ > 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