* Spreadsheet: Last row in ranges
@ 2009-03-13 0:09 Gabor Maroti
2009-03-13 16:59 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Gabor Maroti @ 2009-03-13 0:09 UTC (permalink / raw
To: emacs-orgmode
Dear All,
A quick spreadsheet question. I just wanted the compute the sum of an
entire column by using
| 1 | |
| 2 | |
| 3 | |
#+TBLFM: @1$2=vsum(@1$1..$LR1)
It doesn't do the trick (neither in v6.24a nor in v6.24c): the value of
@1$2 is 3, 12, 29, 120, etc., after multiple application of the TBLFM
line. Thus it looks to me that the $LR1 syntax is not really welcome in
ranges. Is it so?
Anyway, is it possible to compute the sum of a column apart from the
slightly cumbersome vsum(@1$1..@3$1)?
Thanks,
G.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Spreadsheet: Last row in ranges
2009-03-13 0:09 Spreadsheet: Last row in ranges Gabor Maroti
@ 2009-03-13 16:59 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-03-13 16:59 UTC (permalink / raw
To: Gabor Maroti; +Cc: emacs-orgmode
No, $LR1 inserts the *value* of that field.
You can do this:
| 1 | 6 |
| 2 | |
| 3 | |
#+TBLFM: @1$2=vsum(@1$1..@I-1$1)
Org imagines a hline at the end of a table, in your
case this would be the first hline in the table, so
@I-1 refers to the last row.
HTH
- Carsten
On Mar 13, 2009, at 1:09 AM, Gabor Maroti wrote:
> Dear All,
>
> A quick spreadsheet question. I just wanted the compute the sum of an
> entire column by using
>
> | 1 | |
> | 2 | |
> | 3 | |
> #+TBLFM: @1$2=vsum(@1$1..$LR1)
>
> It doesn't do the trick (neither in v6.24a nor in v6.24c): the value
> of
> @1$2 is 3, 12, 29, 120, etc., after multiple application of the TBLFM
> line. Thus it looks to me that the $LR1 syntax is not really
> welcome in
> ranges. Is it so?
>
> Anyway, is it possible to compute the sum of a column apart from the
> slightly cumbersome vsum(@1$1..@3$1)?
>
> Thanks,
> G.
>
>
> _______________________________________________
> 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] 2+ messages in thread
end of thread, other threads:[~2009-03-13 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-13 0:09 Spreadsheet: Last row in ranges Gabor Maroti
2009-03-13 16:59 ` 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.