From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: [Solved sort of ] (was: org table how to «convert» column formula into row formula)
Date: Sat, 30 Sep 2023 14:26:44 +0200 [thread overview]
Message-ID: <87wmw7lud7.fsf@mat.ucm.es> (raw)
In-Reply-To: 8734yvn9ej.fsf@mat.ucm.es
[-- Attachment #1: Type: text/plain, Size: 2145 bytes --]
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
> Hi
> I have the following table
> | name | pos | rango | weight |
> |------+-----+-------+--------|
> | | 23 | 329 | 307 |
> | | 71 | 329 | 259 |
> | | 77 | 333 | 257 |
> | | 58 | 333 | 276 |
> | | 45 | 329 | 285 |
> | | 47 | 330 | 284 |
> | | 71 | 329 | 259 |
> | | 77 | 333 | 257 |
> | | 77 | 333 | 257 |
> | | 155 | 310 | 156 |
> | | 164 | 325 | 162 |
> | | 203 | 330 | 128 |
> #+TBLFM: $4=($3+1)-$2
> I might be forced to add quite a bit of additional columns to that table
> making it difficult to read. So I thought to transpose the table as
> this, but how can I calculate the last row, using a calc operation.
> | Name | | | | | | | | | | | | |
> |--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
> | pos | 23 | 71 | 77 | 58 | 45 | 47 | 71 | 77 | 77 | 155 | 164 | 203 |
> | rango | 329 | 329 | 333 | 333 | 329 | 330 | 329 | 333 | 333 | 310 | 325 | 330 |
> | weight | | | | | | | | | | | | |
> I tried
It seems that
#+Name: row
| Name | | | | | | | | | | | | |
|-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
| pos | 23 | 71 | 77 | 58 | 45 | 47 | 71 | 77 | 77 | 155 | 164 | 203 |
| rango | 329 | 329 | 333 | 333 | 329 | 330 | 329 | 333 | 333 | 310 | 325 | 330 |
| peso | 307 | 259 | 257 | 276 | 285 | 284 | 259 | 257 | 257 | 156 | 162 | 128 |
#+TBLFM: @4$2..@4$13=@3+1-@2
Gives the correct result
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
prev parent reply other threads:[~2023-09-30 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-30 12:16 org table how to «convert» column formula into row formula Uwe Brauer
2023-09-30 12:26 ` Uwe Brauer [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=87wmw7lud7.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--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).