From: Andreas Burtzlaff <andy13@gmx.net>
To: Cecil Westerhof <cldwesterhof@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Some problems with times in a spreadsheet
Date: Thu, 22 Jul 2010 10:43:04 +0200 [thread overview]
Message-ID: <87bp9zc3fr.fsf@gmx.net> (raw)
In-Reply-To: <87eiewrnsj.fsf@linux-lqcw.site> (Cecil Westerhof's message of "Thu, 22 Jul 2010 09:14:20 +0200")
Cecil Westerhof <cldwesterhof@gmail.com> 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.
next prev parent reply other threads:[~2010-07-22 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 10:33 Some problems with times in a spreadsheet Cecil Westerhof
2010-07-21 13:46 ` Juan
2010-07-22 7:14 ` Cecil Westerhof
2010-07-22 8:43 ` Andreas Burtzlaff [this message]
2010-07-22 9:23 ` Darlan Cavalcante Moreira
2010-07-22 11:41 ` Cecil Westerhof
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bp9zc3fr.fsf@gmx.net \
--to=andy13@gmx.net \
--cc=cldwesterhof@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.