emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: Re: remote ref in spreadsheets
Date: Sun, 22 Jan 2017 12:42:40 +0100	[thread overview]
Message-ID: <87pojffhhr.fsf@luisa.c0t0d0s0.de> (raw)
In-Reply-To: <9ae5pbxf26.ln2@news.c0t0d0s0.de> (Michael Welle's message of "Wed, 21 Jan 2015 21:20:57 +0100")

Hello,

so, two years and two yearly tables later I solved the problem. I
couldn't see how to get that to work with orgaggregate, so I tried a
different approach. My tables look like follows:

* Tables
#+NAME: overview
| Year |  Sum   |
|------+--------|
| 2017 | 107.90 |
| 2016 |  42.00 |
|------+--------|
#+TBLFM: $2='(org-table-get-remote-range (concat "BC_" $1) (string ?@ ?I ?I ?$ ?3));%.2f

** 2017
#+NAME: BC_2017
|--------+-------+--------|
| 13.01. | foo   |  38.90 |
| 13.01. | bar   |  69.00 |
|--------+-------+--------|
|        | Summe | 107.90 |
#+TBLFM: $3=vsum(@I..@II);%.2f


For every year I have a table named BC_yyyy that sums up some stuff.
What I want is a table that gives an overview about all the sums of
every year. My first approach was to add a new formula to the overview
table every year. That worked for the first couple of years. But I had
to change the cell addresses of every existing formula when adding a new
row and after a few years that became clumsy.

With the above approach I only had to insert a new row into the overview
table and fill in the year into the first column. I could automate that
further and let Org find all tables named BC_yyyy. Maybe next year ;).

Regards
hmw

      parent reply	other threads:[~2017-01-22 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9ae5pbxf26.ln2@news.c0t0d0s0.de>
2015-01-21 21:12 ` remote ref in spreadsheets Michael Brand
2017-01-22 11:42 ` Michael Welle [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=87pojffhhr.fsf@luisa.c0t0d0s0.de \
    --to=mwe012008@gmx.net \
    --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).