* Adding items in table
@ 2014-10-02 8:13 Chris Henderson
2014-10-02 8:53 ` Christian Moe
0 siblings, 1 reply; 5+ messages in thread
From: Chris Henderson @ 2014-10-02 8:13 UTC (permalink / raw)
To: org-mode
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 267 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Adding items in table
2014-10-02 8:13 Adding items in table Chris Henderson
@ 2014-10-02 8:53 ` Christian Moe
2014-10-02 9:01 ` Fwd: " Christian Moe
0 siblings, 1 reply; 5+ messages in thread
From: Christian Moe @ 2014-10-02 8:53 UTC (permalink / raw)
To: Chris Henderson; +Cc: org-mode
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Fwd: Re: Adding items in table
2014-10-02 8:53 ` Christian Moe
@ 2014-10-02 9:01 ` Christian Moe
2014-10-02 9:42 ` Chris Henderson
0 siblings, 1 reply; 5+ messages in thread
From: Christian Moe @ 2014-10-02 9:01 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Re: Adding items in table
2014-10-02 9:01 ` Fwd: " Christian Moe
@ 2014-10-02 9:42 ` Chris Henderson
2014-10-02 9:59 ` Christian Moe
0 siblings, 1 reply; 5+ messages in thread
From: Chris Henderson @ 2014-10-02 9:42 UTC (permalink / raw)
To: Christian Moe; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
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 <mail@christianmoe.com> 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.
>
>
>
[-- Attachment #2: Type: text/html, Size: 1425 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Re: Adding items in table
2014-10-02 9:42 ` Chris Henderson
@ 2014-10-02 9:59 ` Christian Moe
0 siblings, 0 replies; 5+ messages in thread
From: Christian Moe @ 2014-10-02 9:59 UTC (permalink / raw)
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 <mail@christianmoe.com> 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.
>>
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-02 9:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 8:13 Adding items in table Chris Henderson
2014-10-02 8:53 ` Christian Moe
2014-10-02 9:01 ` Fwd: " Christian Moe
2014-10-02 9:42 ` Chris Henderson
2014-10-02 9:59 ` Christian Moe
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).