emacs-orgmode
[Top][All Lists]

## Re: [Orgmode] table formula question

 From: William Henney Subject: Re: [Orgmode] table formula question Date: Tue, 5 Jun 2007 20:39:33 -0500

```Hi Eddward

Does this do what you want?

* wealth management
|--------------------------+---------+---------|
| item                     |  amount | balance |
|--------------------------+---------+---------|
| paid                     |   50.00 |   50.00 |
| baby's new part of shoes |  -25.00 |   25.00 |
| chip                     |   -2.50 |   22.50 |
| my birthday!             |  100.00 |  122.50 |
| speeding fine :(         | -200.00 |  -77.50 |
|--------------------------+---------+---------|
#+TBLFM: \$3=vsum(@-I\$-1..\$-1);f2

By explicitly doing the summation, I avoid any dependence on the order
in which each row is calculated. I think that your version fails
because your formula makes no sense for the first row: you can't add a
string ("total") to a float (50.00).

Cheers

Will

On 6/5/07, Eddward DeVilla <address@hidden> wrote:
```
```Hi,

I'm having trouble trying to figure out what I've got wrong here.
Given the table

* wealth management
|--------------------------+--------+-------|
| item                     | amount | total |
|--------------------------+--------+-------|
| paid                     |  50.00 |       |
| baby's new part of shoes | -25.00 |       |
| chip                     |  -2.50 |       |
|--------------------------+--------+-------|
#+TBLFM: \$3='(+ @-1 \$-1)

I would expect to get the results

* wealth management
|--------------------------+--------+-------|
| item                     | amount | total |
|--------------------------+--------+-------|
| paid                     |  50.00 | 50.00 |
| baby's new part of shoes | -25.00 | 25.00 |
| chip                     |  -2.50 | 22.50 |
|--------------------------+--------+-------|
#+TBLFM: \$3='(+ @-1 \$-1)

* wealth management
|--------------------------+--------+--------|
| item                     | amount | total  |
|--------------------------+--------+--------|
| paid                     |  50.00 | #ERROR |
| baby's new part of shoes | -25.00 | #ERROR |
| chip                     |  -2.50 | #ERROR |
|--------------------------+--------+--------|
#+TBLFM: \$3='(+ @-1 \$-1)

I'm sure I'm missing something.  Is a table like this even possible?

Edd

_______________________________________________
Emacs-orgmode mailing list
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

```
```

--

Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia

```