From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Table Formula: Update column, then update value Date: Thu, 11 Sep 2014 15:30:15 +0100 Message-ID: <87a9668c20.fsf@ucl.ac.uk> References: <87oaum6yvh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS5OK-0004it-Ji for emacs-orgmode@gnu.org; Thu, 11 Sep 2014 10:30:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XS5OC-0002is-MF for emacs-orgmode@gnu.org; Thu, 11 Sep 2014 10:30:32 -0400 Received: from mail-db3on0104.outbound.protection.outlook.com ([157.55.234.104]:27744 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS5OC-0002fM-Dw for emacs-orgmode@gnu.org; Thu, 11 Sep 2014 10:30:24 -0400 In-Reply-To: <87oaum6yvh.fsf@gmail.com> (Tory S. Anderson's message of "Thu, 11 Sep 2014 10:00:18 -0400") 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: "Tory S. Anderson" Cc: orgmode list --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=3Dvsum(@I..II)::$ttl=3Dvsum(@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=3Dvsum($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=3D$3*$2::$hrs=3Dvsum(@I..II)::$ttl=3Dvsum(@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. =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-320-gb5c9= de --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlQRsfcACgkQyJGT2P/89n1asgCffRGNqav+L7zJXT7cvrf61MJh YlkAniRsq5PMA8VJJW3iIeRt+6PjzJPK =bFoJ -----END PGP SIGNATURE----- --=-=-=--