From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: Re: Some problems with times in a spreadsheet Date: Thu, 22 Jul 2010 11:23:16 +0200 Message-ID: <4c480e04.a8e8d80a.7362.fffff361@mx.google.com> References: <87mxtljf95.fsf@linux-lqcw.site> <20100721134617.GK5569@soloJazz.com> <87eiewrnsj.fsf@linux-lqcw.site> <87bp9zc3fr.fsf@gmx.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=50415 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Obrzt-0001wT-HQ for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 05:23:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Obrzq-0002jE-OG for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 05:23:19 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:62180) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Obrzq-0002j4-K9 for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 05:23:18 -0400 Received: by wwb31 with SMTP id 31so1230170wwb.30 for ; Thu, 22 Jul 2010 02:23:17 -0700 (PDT) In-Reply-To: <87bp9zc3fr.fsf@gmx.net> 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: Andreas Burtzlaff Cc: Cecil Westerhof , emacs-orgmode@gnu.org I always use the formula editor even when I have a single formula. It will even highlight in the cells in the table related to the construct where the cursor is in (the region pointed by @-II..@-I, for instance). It also makes easy to change a cell reference using shift+arrows. To make it short, it is better to understand the single line below the table with all formulas as the place where org stores the formulas, and not the place where you should manually edit them. -- Darlan At Thu, 22 Jul 2010 10:43:04 +0200, Andreas Burtzlaff wrote: > > Cecil Westerhof writes: > > > Op woensdag 21 jul 2010 15:46 CEST schreef Juan: > > > >>> | # | Total hours | 16@ 15' 0" | 18@ 5' 0" | > >>> | ^ | | totalTime1 | totalTime2 | > >>> |---+-------------+------------+------------| > >>> #+TBLFM: $totalTime1=vsum(@-II..@-I); f2 :: $totalTime2=vsum(@-II..@-I); f2 > >> > >>> First of all I would like to see 16.25 instead of 16@ 15' 0". Is this > >>> possible? > >> > >> Calc's "deg" function does this. > >> > >> use deg(vsum(...)) in the formulas > > > > That works. Thanks. I should learn calc. ;-} > > > > I now have (I already made changes): > > |---+-------------+--------------+--------------| > > | # | Total hours | 14.00 | 6.00 | > > | ^ | | totalTime1 | totalTime2 | > > | | Hourly rate | 40 | 50 | > > | ^ | | hourRate1 | hourRate2 | > > | # | To declare | 560.00 | 300.00 | > > | ^ | | declaration1 | declaration2 | > > |---+-------------+--------------+--------------| > > #+TBLFM: $totalTime1=deg(vsum(@-II..@-I)); f2 :: $totalTime2=deg(vsum(@-II..@-I)); f2 :: $declaration1=$totalTime1*$hourRate1; f2 :: $declaration2=$totalTime2*$hourRate2; f2 > > > > This works. One strange thing (not important I think, but I mention > > it), I needed to recalculate twice. The first time the 'Total hours' > > was displayed correctly, only the second time 'To declare' was > > displayed correctly. > > > > I have two formula's that I have to write for every column, I still > > would like to now if there is a way to only write them once. > > No, I'm afraid not. > > > I am not very happy with the long line of formula's. Especially when I > > have to repeat formula's. Would something like this be possible? > > #+TBLFM: $totalTime1=deg(vsum(@-II..@-I)); f2 :: > > $totalTime2=deg(vsum(@-II..@-I)); f2 :: > > $declaration1=$totalTime1*$hourRate1; f2 :: > > $declaration2=$totalTime2*$hourRate2; f2 > > > > The formula editor ( C-c ' ) will display the formulas one per line and > make duplicating and changing them much easier. > > HTH > > Andreas > > > This would at least make updating repeating formula's easier and > > easier to check. > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode