From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Burtzlaff Subject: Re: Some problems with times in a spreadsheet Date: Thu, 22 Jul 2010 10:43:04 +0200 Message-ID: <87bp9zc3fr.fsf@gmx.net> References: <87mxtljf95.fsf@linux-lqcw.site> <20100721134617.GK5569@soloJazz.com> <87eiewrnsj.fsf@linux-lqcw.site> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=48017 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObrMy-0000SA-Qq for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 04:43:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObrMx-0004xV-Ms for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 04:43:08 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:47123 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1ObrMx-0004x8-EF for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 04:43:07 -0400 In-Reply-To: <87eiewrnsj.fsf@linux-lqcw.site> (Cecil Westerhof's message of "Thu, 22 Jul 2010 09:14:20 +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: Cecil Westerhof Cc: emacs-orgmode@gnu.org 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.