[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Some problems with times in a spreadsheet
From: |
Cecil Westerhof |
Subject: |
Re: [Orgmode] Some problems with times in a spreadsheet |
Date: |
Thu, 22 Jul 2010 09:14:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Op woensdag 21 jul 2010 15:46 CEST schreef Juan:
>> | # | Total hours | 16@ 15' 0" | 18@ 5' 0" |
>> | ^ | | totalTime1 | totalTime2 |
>> |---+-------------+------------+------------|
>> #+TBLFM: $totalTime1=vsum(@address@hidden); f2 ::
>> $totalTime2=vsum(@address@hidden); 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(@address@hidden)); f2 ::
$totalTime2=deg(vsum(@address@hidden)); 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.
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(@address@hidden)); f2 ::
$totalTime2=deg(vsum(@address@hidden)); f2 ::
$declaration1=$totalTime1*$hourRate1; f2 ::
$declaration2=$totalTime2*$hourRate2; f2
This would at least make updating repeating formula's easier and
easier to check.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof