emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Row formula in orgtbl mode
  2011-05-03 15:48 MobileOrg Android 0.5.4 Release - Now with Tablet support Matthew Jones
@ 2011-05-04 13:25 ` Michael Bach
  2011-05-04 13:55   ` Michael Brand
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Bach @ 2011-05-04 13:25 UTC (permalink / raw)
  To: emacs-orgmode

Dear org-mode Users,

Given this table

|               |    a |    b |    c |    d |
| Specific cost |    1 |    9 |    2 |    3 |
| System size   | 1000 | 1000 | 1000 | 1000 |
|               |      |      |      |      |
| ...           |  ... |  ... |  ... |  ... |
#+TBLFM: @4=@2*@3

I am wondering how I would need to format the #+TBLFM: line to multiply
the respective numeric values of rows 2 and 3 in row 4.  I am using org
v.7.4.  All my attempts, also trying to define ranges like
@4$2..@4$5=@-1*@-2, fail.

Thanks in advance,
Michael Bach

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

* Row formula in orgtbl mode
@ 2011-05-04 13:35 Michael Bach
  2011-05-04 15:26 ` Michael Brand
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Bach @ 2011-05-04 13:35 UTC (permalink / raw)
  To: emacs-orgmode


# I sent this one previously by mistake in reply to a totally unrelated post, so now
# again.

Dear org-mode Users,

Given this table

|               |    a |    b |    c |    d |
| Specific cost |    1 |    9 |    2 |    3 |
| System size   | 1000 | 1000 | 1000 | 1000 |
|               |      |      |      |      |
| ...           |  ... |  ... |  ... |  ... |
#+TBLFM: @4=@2*@3

I am wondering how I would need to format the #+TBLFM: line to multiply
the respective numeric values of rows 2 and 3 in row 4.  I am using org
v.7.4.  All my attempts, also trying to define ranges like
@4$2..@4$5=@-1*@-2, fail.

Thanks in advance,
Michael Bach

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

* Re: Row formula in orgtbl mode
  2011-05-04 13:25 ` Row formula in orgtbl mode Michael Bach
@ 2011-05-04 13:55   ` Michael Brand
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Brand @ 2011-05-04 13:55 UTC (permalink / raw)
  To: Michael Bach; +Cc: emacs-orgmode

Hi Michael

On Wed, May 4, 2011 at 15:25, Michael Bach <phaebz@gmail.com> wrote:
> |               |    a |    b |    c |    d |
> | Specific cost |    1 |    9 |    2 |    3 |
> | System size   | 1000 | 1000 | 1000 | 1000 |
> |               |      |      |      |      |
> | ...           |  ... |  ... |  ... |  ... |
> #+TBLFM: @4=@2*@3

Row formulas are not supported, but the new range formulas you already
tried are even more powerful:

> I am wondering how I would need to format the #+TBLFM: line to multiply
> the respective numeric values of rows 2 and 3 in row 4.  I am using org
> v.7.4.  All my attempts, also trying to define ranges like
> @4$2..@4$5=@-1*@-2, fail.

Your range formula @4$2..@4$5=@-1*@-2 will work if you upgrade at
least to this commitdiff
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=8237c9ae6d587a22646333e0315683675e2db538
and will deliver

|               |    a |    b |    c |    d |
| Specific cost |    1 |    9 |    2 |    3 |
| System size   | 1000 | 1000 | 1000 | 1000 |
|               | 1000 | 9000 | 2000 | 3000 |
| ...           |  ... |  ... |  ... |  ... |
#+TBLFM: @4$2..@4$5=@-1*@-2

For this application I would suggest
#+TBLFM: @4$<<..@4$>=@-1*@-2

Michael

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

* Re: Row formula in orgtbl mode
  2011-05-04 13:35 Row formula in orgtbl mode Michael Bach
@ 2011-05-04 15:26 ` Michael Brand
  2011-05-05 12:00   ` Michael Bach
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Brand @ 2011-05-04 15:26 UTC (permalink / raw)
  To: Michael Bach; +Cc: emacs-orgmode

Hi Michael

On Wed, May 4, 2011 at 15:35, Michael Bach <phaebz@gmail.com> wrote:
> # I sent this one previously by mistake in reply to a totally unrelated post, so now
> # again.
# and also the answer again for the mail archives with this thread separate

> |               |    a |    b |    c |    d |
> | Specific cost |    1 |    9 |    2 |    3 |
> | System size   | 1000 | 1000 | 1000 | 1000 |
> |               |      |      |      |      |
> | ...           |  ... |  ... |  ... |  ... |
> #+TBLFM: @4=@2*@3

Row formulas are not supported, but the new range formulas you already
tried are even more powerful:

> I am wondering how I would need to format the #+TBLFM: line to multiply
> the respective numeric values of rows 2 and 3 in row 4.  I am using org
> v.7.4.  All my attempts, also trying to define ranges like
> @4$2..@4$5=@-1*@-2, fail.

Your range formula @4$2..@4$5=@-1*@-2 will work if you upgrade at
least to this commitdiff
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=8237c9ae6d587a22646333e0315683675e2db538
and will deliver

|               |    a |    b |    c |    d |
| Specific cost |    1 |    9 |    2 |    3 |
| System size   | 1000 | 1000 | 1000 | 1000 |
|               | 1000 | 9000 | 2000 | 3000 |
| ...           |  ... |  ... |  ... |  ... |
#+TBLFM: @4$2..@4$5=@-1*@-2

For this application I would suggest
#+TBLFM: @4$<<..@4$>=@-1*@-2

Michael

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

* Re: Row formula in orgtbl mode
  2011-05-04 15:26 ` Michael Brand
@ 2011-05-05 12:00   ` Michael Bach
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Bach @ 2011-05-05 12:00 UTC (permalink / raw)
  To: Michael Brand; +Cc: emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> Your range formula @4$2..@4$5=@-1*@-2 will work if you upgrade at
> least to this commitdiff
> http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=8237c9ae6d587a22646333e0315683675e2db538

I am now running the 7.5 development version checked out today.  I knew
I would have to do this one day...

> |               |    a |    b |    c |    d |
> | Specific cost |    1 |    9 |    2 |    3 |
> | System size   | 1000 | 1000 | 1000 | 1000 |
> |               | 1000 | 9000 | 2000 | 3000 |
> | ...           |  ... |  ... |  ... |  ... |
> #+TBLFM: @4$2..@4$5=@-1*@-2
>
> For this application I would suggest
> #+TBLFM: @4$<<..@4$>=@-1*@-2

Thanks for the quick and competent answer Michael, it worked right away.

MB

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

end of thread, other threads:[~2011-05-05 12:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 13:35 Row formula in orgtbl mode Michael Bach
2011-05-04 15:26 ` Michael Brand
2011-05-05 12:00   ` Michael Bach
  -- strict thread matches above, loose matches on Subject: below --
2011-05-03 15:48 MobileOrg Android 0.5.4 Release - Now with Tablet support Matthew Jones
2011-05-04 13:25 ` Row formula in orgtbl mode Michael Bach
2011-05-04 13:55   ` Michael Brand

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