From mboxrd@z Thu Jan 1 00:00:00 1970 From: torys.anderson@gmail.com (Tory S. Anderson) Subject: Re: Table Formula: Update column, then update value Date: Thu, 11 Sep 2014 10:50:31 -0400 Message-ID: <87tx4exlc8.fsf@gmail.com> References: <87oaum6yvh.fsf@gmail.com> <87a9668c20.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS5hk-0005ot-4L for emacs-orgmode@gnu.org; Thu, 11 Sep 2014 10:50:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XS5hi-00023R-FY for emacs-orgmode@gnu.org; Thu, 11 Sep 2014 10:50:36 -0400 Received: from mail-yk0-x22a.google.com ([2607:f8b0:4002:c07::22a]:64535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS5hi-000236-7l for emacs-orgmode@gnu.org; Thu, 11 Sep 2014 10:50:34 -0400 Received: by mail-yk0-f170.google.com with SMTP id 19so3469120ykq.29 for ; Thu, 11 Sep 2014 07:50:33 -0700 (PDT) In-Reply-To: <87a9668c20.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 11 Sep 2014 15:30:15 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: orgmode list When I apply the formula #+TBLFM: $4=$3*$2::$hrs=vsum(@I..II)::$ttl=vsum(@I..II) It doesn't give me any errors, but it also doesn't do anything to $4. So if I change one of my hour amounts, the "hrs" field will update appropriately, but not the "cost" field, which remains unchanged. It appears that the initial formula is not doing anything. Org-mode version 8.2.7c (8.2.7c-61-g4b9146-elpa Eric S Fraga writes: > On Thursday, 11 Sep 2014 at 10:00, Tory S. Anderson wrote: >> I have a table that calculates daily cost and then sums the hours and >> the weekly cost. But I can't seem to get a formula that will do the >> former. >> >> | Date | Hours | Rate | Cost | >> |--------------+-------+------+------| >> | September 8 | 0.50 | 1 | 1. | >> | September 9 | 2.00 | 1 | 2. | >> | September 10 | 2.00 | 1 | 2. | >> | September 11 | 2.00 | 1 | 2. | >> | September 12 | 2.00 | 1 | 2. | >> |--------------+-------+------+------| >> | | 8.5 | | 399. | >> | ^ | hrs | | ttl | >> >> #+TBLFM: $hrs=vsum(@I..II)::$ttl=vsum(@I..II) >> >> Before the formula above works, I end up pasting the following line >> just below the last date (above the @II line): >> >> #+TBLFM: $4=vsum($2*$3) > >> >> So, I have to copy-paste into the middle of my table, run the line, >> then cut the line back out of the table and run the lower line. I'm >> just sure there's a better way; it even seems like once upon a time I >> had something working. But is there a non-repetitive way to autofill >> the COST ($4) column between @I..II without wiping out everything >> else? > > I am not sure what is the problem here. The above table works fine for > me with this TBLFM line: > > #+TBLFM: $4=$3*$2::$hrs=vsum(@I..II)::$ttl=vsum(@I..II) > > What is it you expect? Note, your September 8 entry for the cost is > wrong... but will get updated if you use this TBLFM line.