emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* field formula referencing field from other table?
@ 2009-10-08 16:43 Marko Schütz
  2009-10-08 20:17 ` Stephan Schmitt
  0 siblings, 1 reply; 2+ messages in thread
From: Marko Schütz @ 2009-10-08 16:43 UTC (permalink / raw)
  To: Org Mode Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 1151 bytes --]

Dear All,

I have two tables in a file, each being summed separately. Now I'd
like to have a third table summing the two sub-sums.

Here is an example:

\begin{comment}
#+ORGTBL: SEND criterion1 orgtbl-to-latex :splice t :skip 2
| Positions |   \euro |
|-----------+---------|
| pos 1.1   |  465.87 |
| pos 1.2   |  512.28 |
| pos 1.3   | 2689.78 |
| pos 1.4   | 1920.55 |
|-----------+---------|
| Sum 1     | 5588.48 |
#+TBLFM: @6$2=vsum(@2..@5);%.2f
\end{comment}
\begin{comment}
#+ORGTBL: SEND criterion2 orgtbl-to-latex :splice t :skip 2
| Positions |   \euro |
|-----------+---------|
| pos 2.1   | 1083.37 |
| pos 2.1   |  334.87 |
|-----------+---------|
| Sum 2     | 1418.24 |
#+TBLFM: @4$2=vsum(@2..@3);%.2f
\end{comment}

and the table summing the sub-sums:

\begin{comment}
#+ORGTBL: SEND total orgtbl-to-latex :splice t :skip 2
| Positions       | \euro |
|-----------------+-------|
| Sum criterion 1 |       |
| Sum criterion 2 |       |
|-----------------+-------|
| Total           |       |
#+TBLFM: @2$2=????;%.2f::@3$2=????;%.2f::@4$2=vsum(@2..@3);%.2f
\end{comment}

Any advice would be greatly appreciated.

Best regards,

Marko

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: field formula referencing field from other table?
  2009-10-08 16:43 field formula referencing field from other table? Marko Schütz
@ 2009-10-08 20:17 ` Stephan Schmitt
  0 siblings, 0 replies; 2+ messages in thread
From: Stephan Schmitt @ 2009-10-08 20:17 UTC (permalink / raw)
  To: Marko Schütz; +Cc: Org Mode Mailing List

Hi Marco,

take a look at section 3.5.1 of the org-mode info

in *scratch*:
  (info "(org)References") C-x C-e

in particular at the last section of this page.

HTH,
	Stephan

Marko Schütz wrote:
> Dear All,
> 
> I have two tables in a file, each being summed separately. Now I'd
> like to have a third table summing the two sub-sums.
> 
> Here is an example:
> 
> \begin{comment}
> #+ORGTBL: SEND criterion1 orgtbl-to-latex :splice t :skip 2
> | Positions |   \euro |
> |-----------+---------|
> | pos 1.1   |  465.87 |
> | pos 1.2   |  512.28 |
> | pos 1.3   | 2689.78 |
> | pos 1.4   | 1920.55 |
> |-----------+---------|
> | Sum 1     | 5588.48 |
> #+TBLFM: @6$2=vsum(@2..@5);%.2f
> \end{comment}
> \begin{comment}
> #+ORGTBL: SEND criterion2 orgtbl-to-latex :splice t :skip 2
> | Positions |   \euro |
> |-----------+---------|
> | pos 2.1   | 1083.37 |
> | pos 2.1   |  334.87 |
> |-----------+---------|
> | Sum 2     | 1418.24 |
> #+TBLFM: @4$2=vsum(@2..@3);%.2f
> \end{comment}
> 
> and the table summing the sub-sums:
> 
> \begin{comment}
> #+ORGTBL: SEND total orgtbl-to-latex :splice t :skip 2
> | Positions       | \euro |
> |-----------------+-------|
> | Sum criterion 1 |       |
> | Sum criterion 2 |       |
> |-----------------+-------|
> | Total           |       |
> #+TBLFM: @2$2=????;%.2f::@3$2=????;%.2f::@4$2=vsum(@2..@3);%.2f
> \end{comment}
> 
> Any advice would be greatly appreciated.
> 
> Best regards,
> 
> Marko
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-10-08 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-08 16:43 field formula referencing field from other table? Marko Schütz
2009-10-08 20:17 ` Stephan Schmitt

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