From: Jeffrey Brent McBeth <mcbeth@broggs.org>
To: emacs-orgmode@gnu.org
Subject: Re: org-table relative reference questions
Date: Tue, 21 Apr 2015 10:43:47 -0400 [thread overview]
Message-ID: <20150421144347.GF16503@broggs.org> (raw)
In-Reply-To: <CALn3zohvjdG3HW0fU1tyWxcFNf-FYGteToqt0jYM0piWBWA3wA@mail.gmail.com>
On Tue, Apr 21, 2015 at 10:13:53AM +0200, Michael Brand wrote:
> Hi Jeffrey
>
> On Mon, Apr 20, 2015 at 3:35 PM, Jeffrey Brent McBeth <mcbeth@broggs.org> wrote:
> > I'm looking for a way to reference a row or column on both the left
> > side and right side of a table formula that is "easily" manipulable.
>
> As you noticed the left side is very limited compared to the right
> side. The solution below keeps the left side simple. "x" is used as a
> movable marker to indicate the beginning of the range:
>
> | F | A | B | C |
> |---+---+---+----|
> | x | 1 | 3 | 4 |
> | | 2 | 4 | 69 |
> |---+---+---+----|
> | | 3 | | |
> #+TBLFM: @>$2 = vsum(subvec(@I$2..@II$2, find(@I$1..@II$1, x), 0)); E
> :: @<<$4..@>>$4 = if("$1" == "(x)", $-2 + $-1, $0)
That is awesome. subvec and if seem to be two very powerful tools that I've missed as I've trawled the documentation. Thank you so much.
Jeff
--
"The man who does not read good books has no advantage over
the man who cannot read them."
-- Mark Twain
prev parent reply other threads:[~2015-04-21 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 13:35 org-table relative reference questions Jeffrey Brent McBeth
2015-04-20 14:38 ` Jeffrey Brent McBeth
2015-04-21 8:13 ` Michael Brand
2015-04-21 14:43 ` Jeffrey Brent McBeth [this message]
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=20150421144347.GF16503@broggs.org \
--to=mcbeth@broggs.org \
--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).