From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Calc: Second to last row Date: Wed, 31 Aug 2016 17:14:52 +0200 Message-ID: <2016-08-31T17-06-58@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfCfO-0001E2-1P for emacs-orgmode@gnu.org; Wed, 31 Aug 2016 17:03:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfCfJ-0005Ku-Rl for emacs-orgmode@gnu.org; Wed, 31 Aug 2016 17:03:24 -0400 Received: from [195.159.176.226] (port=45708 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfCfJ-0005KV-LF for emacs-orgmode@gnu.org; Wed, 31 Aug 2016 17:03:21 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bf7EE-000748-Iz for emacs-orgmode@gnu.org; Wed, 31 Aug 2016 17:15:02 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi! I would like to refer to the second to last row of a table. The following example should demonstrate my issue. What I expect is that the following formula is filling @2..@5 with "1" and in the last row, there is the sum of all "1". It is important to me to ignore the number of horizontal lines since their number varies in my case. | Values | |--------| | | | | |--------| | | | | |--------| | | #+TBLFM: @2$1..@>-1$1=1 :: @>$1=vsum(@2$1..@>-1$1) Expected result: | Values | |--------| | 1 | | 1 | |--------| | 1 | | 1 | |--------| | 4 | Actual result: "user-error: Several field/range formulas try to set @8$1". With a fixed number of horizontal lines, the sum would be: #+TBLFM: @>$1=vsum(@2$1..@III$1);T So how can this be accomplished for an arbitrary number of horizontal lines? At my side: Org-mode version 8.3.4 (release_8.3.4-33-gd522fc) -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github