emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jarmo Hurri <jarmo.hurri@syk.fi>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Lookup functions, take two
Date: Mon, 24 Sep 2012 20:33:29 +0300	[thread overview]
Message-ID: <87fw67s4uu.fsf@syk.fi> (raw)
In-Reply-To: 878vbzo6yu.fsf@bzg.ath.cx


Bastien <bzg@altern.org> writes:

> I feel my brain is a bit slow today... so sorry in advance if the
> question sounds stupid.  What is the advantage of using org-lookup-*
> functions instead of a simple reference in the table formulas?

As noted in the documentation, most often you do something like this
when fetching data from another table (in the case of org, using
remote). I would preferred to include cases like this, but the
tblfm-lines were too long for the resulting PDF... Say I have 100
students, and I want to grade them. I find the sum of their marks, and
then have a grading table for the grades. The lookup function maps the
marks to the grades, as shown in documentation in the second example.

Another application would be, say, mapping your postal code to your
municipality. The "user" would input the postal code, and the table
would automatically fetch the corresponding municipality from another
table.

A third example would be a discount rate that depends on the total sum
of your bill. Or a bonus that depends on how productive you were (given
as a table by the suits).

M*crosoft equivalents, supported by libreoffice, are the hlookup and
vlookup functions:

http://help.libreoffice.org/Calc/Spreadsheet_Functions#VLOOKUP

--

Jarmo

  reply	other threads:[~2012-09-24 17:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-23 15:26 [PATCH] Lookup functions, take two Jarmo Hurri
2012-09-24 14:01 ` Bastien
2012-09-24 17:33   ` Jarmo Hurri [this message]
2012-09-25  1:49     ` Bastien
2012-09-25  4:13       ` Jarmo Hurri
2012-09-25 10:04         ` Bastien
2012-09-25  9:15       ` Dominik, Carsten
2012-09-25 10:02         ` Bastien
2012-09-26 13:00           ` Jarmo Hurri
2012-09-26 13:14             ` Bastien
2012-09-25 19:39 ` Achim Gratz
2012-09-25 22:43   ` Bastien
2012-09-26 13:45     ` Jarmo Hurri
2012-09-26 14:26       ` Bastien
2012-09-26 17:47         ` Jarmo Hurri

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=87fw67s4uu.fsf@syk.fi \
    --to=jarmo.hurri@syk.fi \
    --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).