* Spreadsheet field referencing problem
@ 2009-10-01 7:27 Tassilo Horn
2009-10-01 8:43 ` Stephan Schmitt
0 siblings, 1 reply; 3+ messages in thread
From: Tassilo Horn @ 2009-10-01 7:27 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
I have a table like this:
| Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
|------------------+-----------+---------------+------------+------------|
| | | | | 79000 |
|------------------+-----------+---------------+------------+------------|
| <2009-10-30 Fri> | 7000 | 0 | 0 | |
| <2009-11-15 Sun> | 0 | 0 | 1000 | |
| <2009-12-15 Tue> | 0 | 0 | 1000 | |
In the last column "Restbetrag" I want to have a column formula, so that
I get these values:
| Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
|------------------+-----------+---------------+------------+------------|
| | | | | 79000 |
|------------------+-----------+---------------+------------+------------|
| <2009-10-30 Fri> | 7000 | 0 | 0 | 72000 |
| <2009-11-15 Sun> | 0 | 0 | 1000 | 71000 |
| <2009-12-15 Tue> | 0 | 0 | 1000 | 70000 |
So the formula should take the value from the cell above, and substract
the sum of the other values in that row. So I came up with the formula
#+TBLFM: $5=@-1 - vsum($2..$4)
but recalculating the table gives that:
| Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
|------------------+-----------+---------------+------------+--------------------|
| | | | | Restbetrag |
|------------------+-----------+---------------+------------+--------------------|
| <2009-10-30 Fri> | 7000 | 0 | 0 | Restbetrag - 7000 |
| <2009-11-15 Sun> | 0 | 0 | 1000 | Restbetrag - 8000 |
| <2009-12-15 Tue> | 0 | 0 | 1000 | Restbetrag - 9000 |
How do I get it right?
Bye,
Tassilo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Spreadsheet field referencing problem
2009-10-01 7:27 Spreadsheet field referencing problem Tassilo Horn
@ 2009-10-01 8:43 ` Stephan Schmitt
2009-10-01 9:12 ` Tassilo Horn
0 siblings, 1 reply; 3+ messages in thread
From: Stephan Schmitt @ 2009-10-01 8:43 UTC (permalink / raw)
To: Tassilo Horn, emacs-orgmode
Hi Tassilo,
one solution would be:
| Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
|------------------+-----------+---------------+------------+------------|
| | | | | 79000 |
|------------------+-----------+---------------+------------+------------|
| <2009-10-30 Fri> | 7000 | 0 | 0 | 72000 |
| <2009-11-15 Sun> | 0 | 0 | 1000 | 71000 |
| <2009-12-15 Tue> | 0 | 0 | 1000 | 70000 |
#+TBLFM: $5=@-1 - vsum($2..$4)::@2$5=79000
hth,
Stephan
Tassilo Horn wrote:
> Hi all,
>
> I have a table like this:
>
> | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
> |------------------+-----------+---------------+------------+------------|
> | | | | | 79000 |
> |------------------+-----------+---------------+------------+------------|
> | <2009-10-30 Fri> | 7000 | 0 | 0 | |
> | <2009-11-15 Sun> | 0 | 0 | 1000 | |
> | <2009-12-15 Tue> | 0 | 0 | 1000 | |
>
> In the last column "Restbetrag" I want to have a column formula, so that
> I get these values:
>
> | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
> |------------------+-----------+---------------+------------+------------|
> | | | | | 79000 |
> |------------------+-----------+---------------+------------+------------|
> | <2009-10-30 Fri> | 7000 | 0 | 0 | 72000 |
> | <2009-11-15 Sun> | 0 | 0 | 1000 | 71000 |
> | <2009-12-15 Tue> | 0 | 0 | 1000 | 70000 |
>
> So the formula should take the value from the cell above, and substract
> the sum of the other values in that row. So I came up with the formula
>
> #+TBLFM: $5=@-1 - vsum($2..$4)
>
> but recalculating the table gives that:
>
> | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
> |------------------+-----------+---------------+------------+--------------------|
> | | | | | Restbetrag |
> |------------------+-----------+---------------+------------+--------------------|
> | <2009-10-30 Fri> | 7000 | 0 | 0 | Restbetrag - 7000 |
> | <2009-11-15 Sun> | 0 | 0 | 1000 | Restbetrag - 8000 |
> | <2009-12-15 Tue> | 0 | 0 | 1000 | Restbetrag - 9000 |
>
> How do I get it right?
>
> Bye,
> Tassilo
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Spreadsheet field referencing problem
2009-10-01 8:43 ` Stephan Schmitt
@ 2009-10-01 9:12 ` Tassilo Horn
0 siblings, 0 replies; 3+ messages in thread
From: Tassilo Horn @ 2009-10-01 9:12 UTC (permalink / raw)
To: emacs-orgmode
Stephan Schmitt <drmabuse@cs.tu-berlin.de> writes:
Hi Stephan,
> one solution would be:
>
> | Datum | Anzahlung | Sonderzahlung | Monatsrate | Restbetrag |
> |------------------+-----------+---------------+------------+------------|
> | | | | | 79000 |
> |------------------+-----------+---------------+------------+------------|
> | <2009-10-30 Fri> | 7000 | 0 | 0 | 72000 |
> | <2009-11-15 Sun> | 0 | 0 | 1000 | 71000 |
> | <2009-12-15 Tue> | 0 | 0 | 1000 | 70000 |
> #+TBLFM: $5=@-1 - vsum($2..$4)::@2$5=79000
Ah, so a column formula doesn't touch fields that have an own formula.
Thanks for the hint,
Tassilo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-01 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 7:27 Spreadsheet field referencing problem Tassilo Horn
2009-10-01 8:43 ` Stephan Schmitt
2009-10-01 9:12 ` Tassilo Horn
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.