From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Fwd: Re: Adding items in table Date: Thu, 02 Oct 2014 11:59:07 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZd9c-0004n9-V3 for emacs-orgmode@gnu.org; Thu, 02 Oct 2014 05:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZd9W-0005Ik-Ng for emacs-orgmode@gnu.org; Thu, 02 Oct 2014 05:58:32 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:35869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZd9W-0005E7-Hm for emacs-orgmode@gnu.org; Thu, 02 Oct 2014 05:58:26 -0400 In-reply-to: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Chris Henderson Cc: "emacs-orgmode@gnu.org" It looks like what you actually want to do is add up the numbers in the rows of column 3 -- from row 2 to 3 in your example. Your original formula added up columns (prefixed with `$'). Rows are prefixed with `@'. You need to get rid of the dollar signs in your cells to let Org know they contain numbers. This would work: | Item | Model | price ($) | | x | v | 323.98 | | y | x | 184.45 | | Total | | 508.43 | #+TBLFM: @4$3=vsum(@2..@3) I usually prefer to add horizontal lines and make the formula relative to them: | Item | Model | price ($) | |-------+-------+-----------| | x | v | 323.98 | | y | x | 184.45 | |-------+-------+-----------| | Total | | 508.43 | #+TBLFM: @4$3=vsum(@I..@II) Hope this helps, Christian Chris Henderson writes: > Here's an example of the table (hope the line breaks are ok) > > |Item | Model | price | > | x | v | $323.98 > | y | x | $184.45| > | Total | | ?? | > > On Thu, Oct 2, 2014 at 7:01 PM, Christian Moe wrote: > >> >> Christian Moe writes: >> >> You probably don't really want to replace the contents of column 3 ($3) >> with a sum of columns including column 3 ($2..$9)? >> >> To get useful help you'll need to provide the table, or a minimal >> example of a table with the same structure. >> >> Yours, >> Christian >> >> > >> > Chris Henderson writes: >> > >> >> I have a table and would like to add all costs (in $) in column 3 as a >> >> total. Wondering how do I do that. I have done "=vsum($2..$9)" - but >> this >> >> hangs my org file and I have to kill it with the -9 switch. >> >> >> >> Thanks. >> >> >>