From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Crook Subject: Re: making flexible table formulas Date: Mon, 28 Feb 2011 10:14:04 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1220886906==" Return-path: Received: from [140.186.70.92] (port=34493 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu7gF-0004Ld-6l for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 13:18:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pu7bi-0005Z1-KI for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 13:14:07 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:46895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pu7bi-0005Yr-Fw for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 13:14:06 -0500 Received: by wwj40 with SMTP id 40so1964228wwj.30 for ; Mon, 28 Feb 2011 10:14:04 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rustom Mody Cc: emacs-orgmode --===============1220886906== Content-Type: multipart/alternative; boundary=001485f27cda1aacd3049d5ba5bd --001485f27cda1aacd3049d5ba5bd Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 28, 2011 at 9:35 AM, Rustom Mody 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(@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" > Place the rows you want to sum between horizontal separator lines (see http://orgmode.org/manual/Built_002din-table-editor.html#Built_002din-table-editor ) Then you can do the following: #+TBLFM: @8$2=vsum(@I..@II) Which means, sum the columns between the first and the second separators. -Luke --001485f27cda1aacd3049d5ba5bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Feb 28, 2011 at 9:35 AM, Rustom = Mody <rustomp= mody@gmail.com> wrote:
When using orgmode for hacking on data in a table (org a la spreadsheet)=A0= 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

=A0 #+TBLFM: @8$2=3Dvsum(@1$2..@7$2)

But now I have a problem: I= f 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 over= written with a computation.

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

Place the rows you want to sum between horizontal separ= ator lines (see=A0http://orgmode.org/manual/Built_002di= n-table-editor.html#Built_002din-table-editor)

Then you can do the following:

=A0=A0#+TBLFM: @8$2=3Dvsum(@I..@II)

Which means, = sum the columns between the first and the second separators.

=
-Luke
--001485f27cda1aacd3049d5ba5bd-- --===============1220886906== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1220886906==--