Henri-Paul Indiogine <hindiog...@gmail.com> 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=...@-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)

_______________________________________________
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

Reply via email to