From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode@gnu.org
Subject: Re: Table equations: II on lhs
Date: Mon, 1 Feb 2010 12:58:21 -0600 [thread overview]
Message-ID: <20100201185821.GI18633@thinkpad.adamsinfoserv.com> (raw)
In-Reply-To: <1513b3111002010908l10a2fe09y34370a2cac29b371@mail.gmail.com>
On Mon, Feb 01, 2010 at 12:08:20PM -0500, Kim Toms wrote:
> I am using a simple table to add up some estimates for tasks. On the left
> hand side of the equations in the TBLFM line I can't get an expression like
> @II$2 to work.
>
> Here's an example
> | task | estimate | probable |
> |-------+----------+----------|
> | one | 12 | 2 |
> | two | 10 | 3 |
> |-------+----------+----------|
> | total | 22 | 5 |
> #+TBLFM: @4$2=vsum(@I..@II-1)::@4$3=vsum(@I..@II-1)
>
> I'd like to be able to put @II$2 on the LHS of the equation. That way, when
> I add a row to the table, the equation doesn't have to change.
>
> A workaround for the above table is to use $LR2 and $LR3 instead of the more
> general references.
I do this fairly often. Just use enter to add a row in the table, the
references are automatically updated. Now, if you copy and paste it
won't work.
I just tried your example with the LR, and that worked fine for me.
|-------+----------+----------|
| task | estimate | probable |
|-------+----------+----------|
| one | 12 | 2 |
| two | 10 | 3 |
| three | 8 | 8 |
| three | 8 | 8 |
| three | 8 | 8 |
| three | 8 | 8 |
|-------+----------+----------|
| total | 54 | 37 |
|-------+----------+----------|
#+TBLFM: $LR2=vsum(@-I..@-II)::$LR3=vsum(@-I..@-II)
This isn't copy/paste sensitive at all.
Does that answer your question?
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
next prev parent reply other threads:[~2010-02-01 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 17:08 Table equations: II on lhs Kim Toms
2010-02-01 18:58 ` Russell Adams [this message]
2010-02-02 14:08 ` Kim Toms
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100201185821.GI18633@thinkpad.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.