From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: spreadsheet Date: Fri, 03 Dec 2010 20:31:32 +0000 Message-ID: <87tyiuegyj.fsf@ucl.ac.uk> References: <87ei9y62qo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=48911 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POcI7-00037F-Pq for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 15:31:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POcI6-0007AB-Qy for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 15:31:39 -0500 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:38263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POcI6-0007A0-Ii for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 15:31:38 -0500 In-Reply-To: <87ei9y62qo.fsf@gmail.com> (Henri-Paul Indiogine's message of "Fri, 03 Dec 2010 12:05:51 -0800") 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: hindiogine@gmail.com Cc: emacs-org Henri-Paul Indiogine writes: > Dear Orgmoders: > > I would like to use org-mode spreadsheet for my small business. I would > like to have some type of ledger with running balance. > > I have done this sort of calculation with many spreadsheets > e.g. OpenOffice Calc, but I am not able to do so with org-mode. > > This is what I would like to set up: > > | Date | Debit/Credit | Balance | > |-------+--------------+---------| > | day 1 | -10.00 | -10 | > | day 2 | 50.00 | 40 | > | day 3 | -20.00 | 20 | > | day 4 | 40.00 | 60 | > > and so on. > > I tried the following in cell @2$3 : =$2 + @-1$2 but that does not > work. > > Any suggestions? > > Thanks, > Henri-Paul The following seems to work for me: --8<---------------cut here---------------start------------->8--- * balance | Date | Debit/Credit | Balance | |-------+--------------+---------| | Start | | 0.00 | | day 1 | -10.00 | -10.00 | | day 2 | 50.00 | 40.00 | | day 3 | -20.00 | 20.00 | | day 4 | 40.00 | 60.00 | #+TBLFM: $3=$2+@-1;%.2f::@2$3=0;%.2f --8<---------------cut here---------------end--------------->8--- Alternatively, use babel with ledger if you want a full accounting -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.3 (release_7.3.172.g40812)