all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem with sum function in table in org-mode
@ 2007-06-07  5:18 Cecil Westerhof
  2007-06-07  7:12 ` carsten.dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Cecil Westerhof @ 2007-06-07  5:18 UTC (permalink / raw)
  To: help-gnu-emacs

I have the following table in org-mode:

|--------+------------------------+-------+----------|
| client |                  hours | tarif |   amount |
|--------+------------------------+-------+----------|
| A      |                  12.50 |    75 |   937.50 |
| B      |                  16.00 |    85 |  1360.00 |
| C      |                  73.50 |   100 |  7350.00 |
| D      |                  13.50 |   125 |  1687.50 |
|--------+------------------------+-------+----------|
| Total  | :=vsum(@II..@III);%.2f |       | 11335.00 |
|--------+------------------------+-------+----------|
#+TBLFM: $4=$2*$3;%.2f::@6$4=vsum(@II..@III);%.2f

The total in the amount column works without a problem, but in the hours
column it does not work. What is going wrong here?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with sum function in table in org-mode
  2007-06-07  5:18 Problem with sum function in table in org-mode Cecil Westerhof
@ 2007-06-07  7:12 ` carsten.dominik
  2007-06-08  7:45   ` Cecil Westerhof
  0 siblings, 1 reply; 4+ messages in thread
From: carsten.dominik @ 2007-06-07  7:12 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 7, 7:18 am, Cecil Westerhof <d...@dummy.nl> wrote:
> I have the following table inorg-mode:
>
> |--------+------------------------+-------+----------|
> | client |                  hours | tarif |   amount |
> |--------+------------------------+-------+----------|
> | A      |                  12.50 |    75 |   937.50 |
> | B      |                  16.00 |    85 |  1360.00 |
> | C      |                  73.50 |   100 |  7350.00 |
> | D      |                  13.50 |   125 |  1687.50 |
> |--------+------------------------+-------+----------|
> | Total  | :=vsum(@II..@III);%.2f |       | 11335.00 |
> |--------+------------------------+-------+----------|
> #+TBLFM: $4=$2*$3;%.2f::@6$4=vsum(@II..@III);%.2f
>
> The total in the amount column works without a problem, but in the hours
> column it does not work. What is going wrong here?

Go into the table field with the formula and press either TAB or C-c C-
c.

Hope this helps

- Carsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with sum function in table in org-mode
  2007-06-07  7:12 ` carsten.dominik
@ 2007-06-08  7:45   ` Cecil Westerhof
  2007-06-08  8:13     ` carsten.dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Cecil Westerhof @ 2007-06-08  7:45 UTC (permalink / raw)
  To: help-gnu-emacs

 carsten.dominik@gmail.com wrote:

> On Jun 7, 7:18 am, Cecil Westerhof <d...@dummy.nl> wrote:
>> I have the following table inorg-mode:
>>
>> |--------+------------------------+-------+----------|
>> | client |                  hours | tarif |   amount |
>> |--------+------------------------+-------+----------|
>> | A      |                  12.50 |    75 |   937.50 |
>> | B      |                  16.00 |    85 |  1360.00 |
>> | C      |                  73.50 |   100 |  7350.00 |
>> | D      |                  13.50 |   125 |  1687.50 |
>> |--------+------------------------+-------+----------|
>> | Total  | :=vsum(@II..@III);%.2f |       | 11335.00 |
>> |--------+------------------------+-------+----------|
>> #+TBLFM: $4=$2*$3;%.2f::@6$4=vsum(@II..@III);%.2f
>>
>> The total in the amount column works without a problem, but in the hours
>> column it does not work. What is going wrong here?
> 
> Go into the table field with the formula and press either TAB or C-c C-
> c.

That works. I tried 'C-c *' what did work on the other fields, but not on
this one. Well, I have a workaround now. ;=}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with sum function in table in org-mode
  2007-06-08  7:45   ` Cecil Westerhof
@ 2007-06-08  8:13     ` carsten.dominik
  0 siblings, 0 replies; 4+ messages in thread
From: carsten.dominik @ 2007-06-08  8:13 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 8, 9:45 am, Cecil Westerhof <d...@dummy.nl> wrote:
>  carsten.domi...@gmail.com wrote:
> > On Jun 7, 7:18 am, Cecil Westerhof <d...@dummy.nl> wrote:
> >> I have the following table inorg-mode:
>
> >> |--------+------------------------+-------+----------|
> >> | client |                  hours | tarif |   amount |
> >> |--------+------------------------+-------+----------|
> >> | A      |                  12.50 |    75 |   937.50 |
> >> | B      |                  16.00 |    85 |  1360.00 |
> >> | C      |                  73.50 |   100 |  7350.00 |
> >> | D      |                  13.50 |   125 |  1687.50 |
> >> |--------+------------------------+-------+----------|
> >> | Total  | :=vsum(@II..@III);%.2f |       | 11335.00 |
> >> |--------+------------------------+-------+----------|
> >> #+TBLFM: $4=$2*$3;%.2f::@6$4=vsum(@II..@III);%.2f
>
> >> The total in the amount column works without a problem, but in the hours
> >> column it does not work. What is going wrong here?
>
> > Go into the table field with the formula and press either TAB or C-c C-
> > c.
>
> That works. I tried 'C-c *' what did work on the other fields, but not on
> this one. Well, I have a workaround now. ;=}

It is not really a work-around though.  `C-c *' does re-apply all
stored formulas.
The formula you has typed was not yet stored (moved to the TBLFM
line),
that only happens when you press TAB or `C-c C-c' or RET in the field
where
you typed the formula, or if you enter the formula with the `C-c =' or
`C-u C-c C-=' commands.


- Carsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-08  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07  5:18 Problem with sum function in table in org-mode Cecil Westerhof
2007-06-07  7:12 ` carsten.dominik
2007-06-08  7:45   ` Cecil Westerhof
2007-06-08  8:13     ` carsten.dominik

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.