[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] making flexible table formulas
From: |
Nick Dokos |
Subject: |
Re: [O] making flexible table formulas |
Date: |
Mon, 28 Feb 2011 13:18:30 -0500 |
Rustom Mody <address@hidden> wrote:
> 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(@address@hidden)
>
> 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.
>
>
Of course it's reasonable - and of course, org implements it :-)
#+TBLFM: $LR2=vsum(@address@hidden)
In words: column 2 of the last row is the sum of all the rows
(implicitly in column 2) from row 1 to the row above the last one.
See section 3.5.1, "Tables>The spreadsheet>References" for more details.
Nick