emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* relative row reference in table formula
@ 2012-03-01 14:01 OSiUX
  2012-03-01 16:54 ` Juan Pechiar
  0 siblings, 1 reply; 2+ messages in thread
From: OSiUX @ 2012-03-01 14:01 UTC (permalink / raw)
  To: emacs-orgmode

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

is possible to define the reference to the last row of the following @II+$3, to avoid
having to change the number of row (@4$3)?

in this example does not calculate:

  | date             | item          |    cost |
  |------------------+---------------+---------|
  | [2012-03-01 jue] | item 1        |   30.00 |
  | [2012-03-01 jue] | item 2        |   20.00 |
  |------------------+---------------+---------|
  |                  |               |   30.00 |
  #+TBLFM: @II+$3=vsum(@I..@II);%0.2f

thanks!

--

::

  Osiris Alejandro Gomez (OSiUX) osiux@osiux.com.ar
  AA70 93FD B6EF EB42 6920 7530 A799 B226 74C8 A3FE
  http://osiux.com http://wiki.buenosaireslibre.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: relative row reference in table formula
  2012-03-01 14:01 relative row reference in table formula OSiUX
@ 2012-03-01 16:54 ` Juan Pechiar
  0 siblings, 0 replies; 2+ messages in thread
From: Juan Pechiar @ 2012-03-01 16:54 UTC (permalink / raw)
  To: OSiUX; +Cc: emacs-orgmode

Hi Osiris,

On Thu, Mar 01, 2012 at 11:01:39AM -0300, OSiUX wrote:
> is possible to define the reference to the last row of the following @II+$3, to avoid
> having to change the number of row (@4$3)?
>
> in this example does not calculate:
>
>   | date             | item          |    cost |
>   |------------------+---------------+---------|
>   | [2012-03-01 jue] | item 1        |   30.00 |
>   | [2012-03-01 jue] | item 2        |   20.00 |
>   |------------------+---------------+---------|
>   |                  |               |   30.00 |
>   #+TBLFM: @II+$3=vsum(@I..@II);%0.2f

It should be '@II+1$3' according to documentation, but anyway it
doesn't get evaluated.

However, '@>$3' (meaning the last row, col 3) does get evaluated
correctly.

In any case, if you add/remove rows/columns using M-S-arrows, the
absolute formula references get updated accordingly (e.g. formula at
@4$3 goes to @5$3 after inserting a row).

Saludos,
.j.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-01 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 14:01 relative row reference in table formula OSiUX
2012-03-01 16:54 ` Juan Pechiar

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).