emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Fwd: Re: Adding items in table


From: Christian Moe
Subject: Re: [O] Fwd: Re: Adding items in table
Date: Thu, 02 Oct 2014 11:59:07 +0200
User-agent: mu4e 0.9.9.5-dev6; emacs 24.3.1

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(@address@hidden)

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(@address@hidden)

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 <address@hidden> 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.
>>
>>
>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]