emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode@gnu.org
Subject: Re: recalculate tables
Date: Thu, 25 Aug 2016 18:19:34 +0200	[thread overview]
Message-ID: <20160825161934.GC4165@cardamom.adamsinfoserv.com> (raw)
In-Reply-To: <8737ls29g0.fsf@saiph.selenimh>

> > This doesn't update either (C-u C-c *):
> >
> > |---+-------+---+---|
> > | 1 | derp  | 3 | 3 |
> > | 2 | derp2 | 5 |   |
> > |---+-------+---+---|
> > |   |       |   | 0 |
> > #+TBLFM: $4=$1*$3
> >
> > I'd been working with these recently and discovered sometimes it
> > wasn't updating... I hadn't gotten an MWE though so based on yours I
> > composed a few.
>
> It may be related to the fact that the first row group is considered as
> a table header. Column formulas do not apply on these headers. See first
> paragraph in (info "(org) Column formulas").

Excellent point! That fits the other examples as well.

I thought the header required an extra character in another column to
trigger.

I frequently use horizontal lines to trigger calculation using the
relative range for lines above the current cell, like so:

|   |       |   |       |
|---+-------+---+-------|
| 1 | derp  | 3 |     3 |
| 2 | derp2 | 5 |    10 |
|---+-------+---+-------|
|   |       |   | 13.00 |
#+TBLFM: $4=$1*$3::@4$4=vsum(@-I..@-II);%0.2f

Perhaps someone knows a better way?


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

  reply	other threads:[~2016-08-25 16:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 11:23 recalculate tables Michael Welle
2016-08-25 12:12 ` Russell Adams
2016-08-25 14:46   ` Nicolas Goaziou
2016-08-25 16:19     ` Russell Adams [this message]
2016-08-25 18:57     ` Michael Welle
2016-08-26 14:34       ` Nicolas Goaziou
2016-08-26 15:01         ` Michael Welle
2016-08-28 23:14           ` Nicolas Goaziou
2016-08-29  4:58             ` Michael Welle

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=20160825161934.GC4165@cardamom.adamsinfoserv.com \
    --to=rladams@adamsinfoserv.com \
    --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).