* Table summation
@ 2008-04-01 16:05 Russell Adams
2008-04-01 16:19 ` Russell Adams
2008-04-08 6:22 ` Carsten Dominik
0 siblings, 2 replies; 5+ messages in thread
From: Russell Adams @ 2008-04-01 16:05 UTC (permalink / raw)
To: Org Mode List
Speaking of tables today, I thought I'd post a question that I haven't
found a simple answer for.
How do you sum a table reliably? (ie: tolerant of editing)
This table requires the use of org-table-insert-row (etc...) in order
to keep the formula correct.
| Header |
|--------|
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
|--------|
| 15 |
#+TBLFM: @7$1=vsum(@I..@II)
How can I do something like this, where the last cell is automatically
the sum of the column, and not an absolute reference that must be maintained?
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
|--------|
| 15 |
#+TBLFM: LAST=vsum($0..$0)
Thanks.
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table summation
2008-04-01 16:05 Table summation Russell Adams
@ 2008-04-01 16:19 ` Russell Adams
2008-04-01 21:58 ` Eddward DeVilla
2008-04-08 6:22 ` Carsten Dominik
1 sibling, 1 reply; 5+ messages in thread
From: Russell Adams @ 2008-04-01 16:19 UTC (permalink / raw)
To: emacs-orgmode
On Tue, Apr 01, 2008 at 11:05:01AM -0500, Russell Adams wrote:
> Speaking of tables today, I thought I'd post a question that I haven't
> found a simple answer for.
>
> How do you sum a table reliably? (ie: tolerant of editing)
>
> This table requires the use of org-table-insert-row (etc...) in order
> to keep the formula correct.
>
> | Header |
> |--------|
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> |--------|
> | 15 |
> #+TBLFM: @7$1=vsum(@I..@II)
>
> How can I do something like this, where the last cell is automatically
> the sum of the column, and not an absolute reference that must be maintained?
>
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> |--------|
> | 15 |
> #+TBLFM: LAST=vsum($0..$0)
>
> Thanks.
In reply to myself, perhaps a way to refer to last cell would work.
| 15 |
|--------|
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
#+TBLFM: @1$1=vsum($I..$LAST)
That way using tab on the value "5" would add a new line and not break
the formula reference.
Thanks.
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table summation
2008-04-01 16:19 ` Russell Adams
@ 2008-04-01 21:58 ` Eddward DeVilla
2008-04-02 1:19 ` Russell Adams
0 siblings, 1 reply; 5+ messages in thread
From: Eddward DeVilla @ 2008-04-01 21:58 UTC (permalink / raw)
To: emacs-orgmode
I'm not sure how tolerant you mean. Would it help to use @-I and @-II
Edd
On Tue, Apr 1, 2008 at 11:19 AM, Russell Adams
<RLAdams@adamsinfoserv.com> wrote:
> On Tue, Apr 01, 2008 at 11:05:01AM -0500, Russell Adams wrote:
> > Speaking of tables today, I thought I'd post a question that I haven't
> > found a simple answer for.
> >
> > How do you sum a table reliably? (ie: tolerant of editing)
> >
> > This table requires the use of org-table-insert-row (etc...) in order
> > to keep the formula correct.
> >
> > | Header |
> > |--------|
> > | 1 |
> > | 2 |
> > | 3 |
> > | 4 |
> > | 5 |
> > |--------|
> > | 15 |
> > #+TBLFM: @7$1=vsum(@I..@II)
> >
> > How can I do something like this, where the last cell is automatically
> > the sum of the column, and not an absolute reference that must be maintained?
> >
> > | 1 |
> > | 2 |
> > | 3 |
> > | 4 |
> > | 5 |
> > |--------|
> > | 15 |
> > #+TBLFM: LAST=vsum($0..$0)
> >
> > Thanks.
>
> In reply to myself, perhaps a way to refer to last cell would work.
>
> | 15 |
>
> |--------|
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> #+TBLFM: @1$1=vsum($I..$LAST)
>
> That way using tab on the value "5" would add a new line and not break
> the formula reference.
>
>
>
> Thanks.
>
>
> ------------------------------------------------------------------
> Russell Adams RLAdams@AdamsInfoServ.com
>
> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
>
> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
>
>
> _______________________________________________
> 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] 5+ messages in thread
* Re: Table summation
2008-04-01 21:58 ` Eddward DeVilla
@ 2008-04-02 1:19 ` Russell Adams
0 siblings, 0 replies; 5+ messages in thread
From: Russell Adams @ 2008-04-02 1:19 UTC (permalink / raw)
To: emacs-orgmode
On Tue, Apr 01, 2008 at 04:58:51PM -0500, Eddward DeVilla wrote:
> I'm not sure how tolerant you mean. Would it help to use @-I and @-II
>
> Edd
>
By tolerant I mean not sensitive to absolute table references that
break if you use tab to add more rows at the bottom or C-k to kill
lines in between.
Thanks.
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table summation
2008-04-01 16:05 Table summation Russell Adams
2008-04-01 16:19 ` Russell Adams
@ 2008-04-08 6:22 ` Carsten Dominik
1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2008-04-08 6:22 UTC (permalink / raw)
To: Russell Adams; +Cc: Org Mode List
Hi Russel,
no, I don't see a good way to fix this. Just get used to use
the proper commands to insert new lines. To make it easier to
add new lines at the end, try
(setq org-table-tab-jumps-over-hlines nil)
The TAB will create new lines before horizontal separator lines.
Judging from your own follow-up message, this might be all you need?
- Carsten
On Apr 1, 2008, at 6:05 PM, Russell Adams wrote:
> Speaking of tables today, I thought I'd post a question that I haven't
> found a simple answer for.
>
> How do you sum a table reliably? (ie: tolerant of editing)
>
> This table requires the use of org-table-insert-row (etc...) in order
> to keep the formula correct.
>
> | Header |
> |--------|
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> |--------|
> | 15 |
> #+TBLFM: @7$1=vsum(@I..@II)
>
> How can I do something like this, where the last cell is automatically
> the sum of the column, and not an absolute reference that must be
> maintained?
>
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> |--------|
> | 15 |
> #+TBLFM: LAST=vsum($0..$0)
>
> Thanks.
>
>
> ------------------------------------------------------------------
> Russell Adams RLAdams@AdamsInfoServ.com
>
> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
>
> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
>
>
> _______________________________________________
> 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] 5+ messages in thread
end of thread, other threads:[~2008-04-08 7:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01 16:05 Table summation Russell Adams
2008-04-01 16:19 ` Russell Adams
2008-04-01 21:58 ` Eddward DeVilla
2008-04-02 1:19 ` Russell Adams
2008-04-08 6:22 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).