From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Spreadsheet: Last row in ranges Date: Fri, 13 Mar 2009 17:59:43 +0100 Message-ID: References: <49B9A450.40307@gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiBrT-0004a0-RK for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 14:11:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiBrQ-0004Xa-1d for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 14:11:59 -0400 Received: from [199.232.76.173] (port=57220 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiBrP-0004XP-MG for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 14:11:55 -0400 Received: from mail-ew0-f179.google.com ([209.85.219.179]:57872) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LiBrP-00023v-B0 for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 14:11:55 -0400 Received: by mail-ew0-f179.google.com with SMTP id 27so3513146ewy.42 for ; Fri, 13 Mar 2009 11:11:55 -0700 (PDT) In-Reply-To: <49B9A450.40307@gmail.com> 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: Gabor Maroti Cc: emacs-orgmode@gnu.org 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