From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: formula Date: Tue, 4 Aug 2009 13:40:17 +0200 Message-ID: <8D34FDAD-F585-4547-8176-EF35313637DB@gmail.com> References: <3678e0bb0908021558y35e887d2r481a7eb5a8ab7280@mail.gmail.com> <3678e0bb0908031653v6b1ec438kda7788e0b5df36a2@mail.gmail.com> <92686641-229C-43A6-9D9A-F49BD3EEB12B@gmail.com> <3678e0bb0908032328j379f2f66xffc2f05baebc271b@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYINZ-0004Mr-8s for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 07:40:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYINT-0004Kn-1f for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 07:40:27 -0400 Received: from [199.232.76.173] (port=40082 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYINS-0004Ka-83 for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 07:40:22 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:58002) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYINR-00037R-N0 for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 07:40:21 -0400 Received: by ewy7 with SMTP id 7so541006ewy.42 for ; Tue, 04 Aug 2009 04:40:20 -0700 (PDT) In-Reply-To: <3678e0bb0908032328j379f2f66xffc2f05baebc271b@mail.gmail.com> 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: Haroldo Stenger Cc: emacs-orgmode@gnu.org Hi Haroldo, Well, I am using the newest version of Org-mode for which you'd have to use a filed formula for the first field in the balance column. Then using your formulas, `C-u C-c *' does fill the entire table: | in | out | balance | |-----+-----+---------| | | | 0 | | 30 | | 30 | | | 25 | 5 | | 100 | | 105 | | 500 | | 605 | | | 400 | 205 | | | | 205 | #+TBLFM: $3=@-1$3 + @+0$1 - @+0$2::@2$3=0 So I don't know why this is not working for you. - Carsten On Aug 4, 2009, at 8:28 AM, Haroldo Stenger wrote: > Sure, sorry, that's what text is for :) > > | in | out | balance | > |-----+-----+---------| > | | | | > | 30 | | 30 | > | | 25 | 5 | > | 100 | | 105 | > | 500 | | | > | | 400 | | > | | | | > #+TBLFM: $3=@-1$3 + @+0$1 - @+0$2 > > That's how the table looks like after > - creating the table > - filling columns 1 and 2 with numbers > - creating the column formula in column 3, and > - typing C-c * in @3$3 , @4$3 and @5$3 > > The complete filling of the $3 column doesn't take place by issuing > the commands in http://orgmode.org/org.html#Updating-the-table. If I > go to @6$3 , @7$3 and @8$3 and type C-c * I obtain what I want, > being: > > | in | out | balance | > |-----+-----+---------| > | | | | > | 30 | | 30 | > | | 25 | 5 | > | 100 | | 105 | > | 500 | | 605 | > | | 400 | 205 | > | | | 205 | > #+TBLFM: $3=@-1$3 + @+0$1 - @+0$2 > > I know that what I'm asking should be of easy achievement on my own, > but I got somewhat frustrated when I use the commands and the > filling doesn't happen. Thanks for helping me. > > best, > haroldo > > > > > 2009/8/4 Carsten Dominik > > > > Hi Haroldo, > > > > instead of keeping us guessing what your table might look like, > > maybe you can just post it.... > > > > - Carsten > > > > On Aug 4, 2009, at 1:53 AM, Haroldo Stenger wrote: > > > >> Dear Carsten , > >> > >> Thanks ! That's exactly what I was in need of: a combination of a > column-formula and relative references in the formula. So far, so > good. Now, I have the formula line like this > >> > >> #+TBLFM: $5=@-1$5 + @-0$3 - @-0$4 > >> > >> and the very line I typed the formula gets calculated fine. If I > want another line into the bus, I go to the empty field in the same > column in another line, and go to the Calculate menu, and choose > recalculate line, and the fine result appears there , as expected. > But if I approach Calculate / Recalculate all , in fact , nothing > happens. I tried many times, without result. Recalc line works > perfectly, but that does not seem what I'm looking for, which would > be a recalculation of all the fields in the column that holds my > column-formula. I'll continue reading until I find out, but if you > come up with an answer earlier I'd be grateful in advance ! :-) > >> > >> best , > >> > >> haroldo > >> > >> 2009/8/3 Carsten Dominik > >> Hi Haroldo, > >> > >> > >> You cannot copy a formula easily from one field t the next with > >> shifting the reference like you would do in a normal spreadsheet. > >> However, you can use relative references (see the manual) in > >> order to write formulas in an invariant way, and then use basic > >> editing commands in the C-c ' buffer to define the formula for > >> many fields. Even better, use a column formula which allows > >> you to write a single formula for an entire column. > >> > >> - Carsten > >> > >> > >> On Aug 3, 2009, at 12:58 AM, Haroldo Stenger wrote: > >> > >> hi , I wonder how can a formula in a table be "copied" to a > location below, and its references be shifted alongwise > automatically. I checked every documentation I've found , but that > "feature" does not show up. I'm forced to copy the formula in in the > C-c ' and then go to each of the references and type S-downarrow as > many times. I'd thank any idea here. > >> > >> best regards, haroldo. > >> (thanks for org-mode, it's great) > >> _______________________________________________ > >> 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 > >> > >> > > >