emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Hornung <daniel.hornung@gmx.de>
To: emacs-orgmode@gnu.org
Subject: Table calculations with hline references
Date: Mon, 19 Jan 2015 01:19:04 +0100	[thread overview]
Message-ID: <5451536.a99QyLx36R@whatnow> (raw)

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

Hi,
I am trying to calculate a field using references to horizontal lines 
according to http://orgmode.org/manual/References.html

For example:

| col1 | col2 |
|------+------|
| foo  |    1 |
| bar  |    2 |
| baz  |    4 |
|------+------|
| sum  |      |
|      |      |
#+TBLFM: @II+1$2=vsum(@I$2..@II$2)

The field to the right of "sum" (@5$2 as a fixed reference) should be "7".

The output is as follows though (the cursor was in the "baz" field
when I pressed "C-u C-c *" to recalculate all formulas):

| col1 | col2 |
|------+------|
| foo  |    1 |
| bar  |    2 |
| 7    |    7 |
|------+------|
| 10   |   10 |
|      |      |
#+TBLFM: @II+1$2=vsum(@I$2..@II$2)

Could anyone enlighten me where I made a mistake here?

Thanks a lot,
Daniel


-- 
Mein öffentlicher Schlüssel / My public key: 4096R/600ACB3B 2012-04-01
Fingerabdruck / Fingerprint:
9902 575B B9A0 C339 CFDF  250B 9267 CA6B 600A CB3B
Runterladen z.B. bei/ Get it e.g. from:
pgp.mit.edu, subkeys.pgp.net, pgp.uni-mainz.de, pool.sks-keyservers.net, ...

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2015-01-19  0:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  0:19 Daniel Hornung [this message]
2015-01-19  5:07 ` Table calculations with hline references Aaron Ecay
2015-01-19 21:18   ` Daniel Hornung

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=5451536.a99QyLx36R@whatnow \
    --to=daniel.hornung@gmx.de \
    --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).