emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@alumni.uwaterloo.ca>
To: emacs-orgmode@gnu.org
Subject: Table calculation question
Date: Sun, 26 Aug 2007 15:39:41 -0400	[thread overview]
Message-ID: <871wdqhypu.fsf@gollum.intra.norang.ca> (raw)

In the following table I'd like to vertically sum the column and the
compute a new value based on that sum.

|---+---+---+---+-------+---------|
|   | A | B | C | Total | Details |
|---+---+---+---+-------+---------|
| # | 1 | 2 | 4 |     7 | Item 1  |
| # | 2 | 6 | 4 |    12 | Item 2  |
| # | 2 | 4 | 4 |    10 | Item 3  |
| # | 2 | 6 | 3 |    11 | Item 4  |
|---+---+---+---+-------+---------|
| # |   |   |   |    40 | 400.00  |
| ^ |   |   |   |   tot | result  |
| $ |   |   |   |       | kval=10 |
|---+---+---+---+-------+---------|
#+TBLFM: $5=$2+$3+$4::$tot=vsum(@-II..@-I)::$result=$tot*$kval;%.2f

If I edit any of the values in columns A, B, C and do C-u C-c C-c then
the total (tot) value is recalculated but result is not.  Doing C-u C-c
C-c a second time recalculates result based on the new tot value.

Is there a way to do this in a single table recalculation?

Thanks,
Bernt

             reply	other threads:[~2007-08-26 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26 19:39 Bernt Hansen [this message]
2007-08-27  1:44 ` Table calculation question Eddward DeVilla
2007-08-27  2:25 ` Carsten Dominik
2007-08-27  2:33   ` Bernt Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871wdqhypu.fsf@gollum.intra.norang.ca \
    --to=bernt@alumni.uwaterloo.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).