From mboxrd@z Thu Jan 1 00:00:00 1970 From: RC Subject: Re: Question on spreadsheet formula Date: Sun, 27 Sep 2009 19:35:07 +0000 (UTC) Message-ID: References: <20090926053409.0f65c53b.andy13@gmx.net> 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 1MrzWt-0005X9-8h for emacs-orgmode@gnu.org; Sun, 27 Sep 2009 15:35:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrzWo-0005TB-Ok for emacs-orgmode@gnu.org; Sun, 27 Sep 2009 15:35:30 -0400 Received: from [199.232.76.173] (port=43490 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrzWo-0005T2-GR for emacs-orgmode@gnu.org; Sun, 27 Sep 2009 15:35:26 -0400 Received: from lo.gmane.org ([80.91.229.12]:48188) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MrzWo-0006CC-3x for emacs-orgmode@gnu.org; Sun, 27 Sep 2009 15:35:26 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1MrzWk-0005vy-5f for emacs-orgmode@gnu.org; Sun, 27 Sep 2009 21:35:22 +0200 Received: from vpn.eng.fsu.edu ([146.201.29.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Sep 2009 21:35:22 +0200 Received: from recif by vpn.eng.fsu.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Sep 2009 21:35:22 +0200 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: emacs-orgmode@gnu.org Thank you benny and Andreas for your solutions to my question. I did notice a couple of things I did not expect and would appreciate if someone could tell me what I am missing. In the following table, if I change the value in @2$4, I have to run C-c C-c twice for the change to be propagated. Turning on formula debugging, the first time the first formula gets executed starting only from @3$4 until the end of the table, then the second substitution formula is executed for cell @2#4. This happens even if cells @2$2 and @2$3 have values in them. Does the presence of the substitution formula later in the #+TBLFM line, cause execution of the first formula to start only from the succeeding row? |-----+------+------+-------| | No. | P | E | B | |-----+------+------+-------| | | | | 300 | | 1 | 5000 | 2000 | 3200 | | 2 | 7000 | 1000 | 9200 | | 3 | 5000 | 1000 | 13200 | #+TBLFM: $4=@-1$4+$2-$3::@2$4=300 For the table above, or the following, having a ! in the first column of the first row (which I thought was a way to label columns) causes the calculation formulas not to be executed. |---+-----+------+------+-------| | ! | No. | P | E | B | |---+-----+------+------+-------| | | 1 | 5000 | 2000 | 3000 | | | 2 | 7000 | 1000 | 9000 | | | 3 | 5000 | 1000 | 13000 | | | 4 | 5000 | 2000 | 16000 | #+TBLFM: $5=vsum(@-I$3..@0$3)-vsum(@-I$4..@0$4) Thanks, RC