emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* making flexible table formulas
@ 2011-02-28 17:35 Rustom Mody
  2011-02-28 18:14 ` Luke Crook
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rustom Mody @ 2011-02-28 17:35 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 787 bytes --]

When using orgmode for hacking on data in a table (org a la spreadsheet)  I
have this situation
Say I am concentrating on column 2 and I want the bottom cell to be the sum
of the above cells
For a 7 row table with 8th row having the total I get

  #+TBLFM: @8$2=vsum(@1$2..@7$2)

But now I have a problem: If say I add a row to the table then the next time
I recompute the formula(s) the ninth row is not affected and the 8th row
which is now data gets overwritten with a computation.

So basically I want the @1 and @7 which are hardcoded above to be replaced
by something to the effect: "everything above..." and the @8$2 should be
something to the tune of "bottom of $2"

I guess this may not be a reasonable request -- but with org you never know
:-) so asking if there is some way.

[-- Attachment #1.2: Type: text/html, Size: 846 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please 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] 7+ messages in thread
* Re: making flexible table formulas
@ 2011-03-01  3:19 Rustom Mody
  2011-03-01  4:41 ` theo
  2011-03-01  5:10 ` Nick Dokos
  0 siblings, 2 replies; 7+ messages in thread
From: Rustom Mody @ 2011-03-01  3:19 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos wrote:

> Of course it's reasonable - and of course, org implements it
> #+TBLFM: $LR2=vsum(@1..@-1)

Thanks Nick I can use that. But I dont understand it.  What's the -1?
The manual says -- relative to 'current' column.
What determines 'current?' There must be some obvious POV which I am missing...

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

end of thread, other threads:[~2011-03-01 10:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28 17:35 making flexible table formulas Rustom Mody
2011-02-28 18:14 ` Luke Crook
2011-02-28 18:18 ` Nick Dokos
2011-03-01  9:08 ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2011-03-01  3:19 Rustom Mody
2011-03-01  4:41 ` theo
2011-03-01  5:10 ` Nick Dokos

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).