[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to exclude colum titles from calculations
From: |
Uwe Brauer |
Subject: |
How to exclude colum titles from calculations |
Date: |
Thu, 09 Mar 2023 11:45:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi
Please take this example:
|-------+-----------+-------------+-----------+----------|
| | Account 1 | 1/4 part of | Account 2 | 1/4 |
|-------+-----------+-------------+-----------+----------|
| Item1 | 224999 | | 224999 | |
| Item2 | 269403 | | 269403 | |
| Item3 | | | | |
| Item4 | | | | |
| Item5 | 10300 | 2575.00 | | |
#+TBLFM: $3=if(typeof(0.25*$2) == 12, string(""),0.25*$2); E
f-2::$5=if(typeof(0.25*$4) == 12, string(""),0.25*$4); E f-2
C-c C-c
Leads to the expected
|-------+-----------+-------------+-----------+----------|
| | Account 1 | 1/4 part of | Account 2 | 1/4 |
|-------+-----------+-------------+-----------+----------|
| Item1 | 224999 | 56249.75 | 224999 | 56249.75 |
| Item2 | 269403 | 67350.75 | 269403 | 67350.75 |
| Item3 | | | | |
| Item4 | | | | |
| Item5 | 10300 | 2575.00 | | |
#+TBLFM: $3=if(typeof(0.25*$2) == 12, string(""),0.25*$2); E
f-2::$5=if(typeof(0.25*$4) == 12, string(""),0.25*$4); E f-2
However when I have one line on top of the table
| | What | | This | |
|-------+-----------+-------------+-----------+-----|
| | Account 1 | 1/4 part of | Account 2 | 1/4 |
|-------+-----------+-------------+-----------+-----|
| Item1 | 224999 | | 224999 | |
| Item2 | 269403 | | 269403 | |
| Item3 | | | | |
| Item4 | | | | |
| Item5 | 10300 | 2575.00 | | |
#+TBLFM: $3=if(typeof(0.25*$2) == 12, string(""),0.25*$2); E
f-2::$5=if(typeof(0.25*$4) == 12, string(""),0.25*$4); E f-2
Then C-u C-u C-c C-c leads to
| | What | | This |
|
|-------+-----------+------------------------------+-----------+------------------------------|
| | Account 1 | mul = 12 ? : 0.25 Account 1 | Account 2 | mul = 12 ? :
0.25 Account 2 |
|-------+-----------+------------------------------+-----------+------------------------------|
| Item1 | 224999 | 56249.75 | 224999 |
56249.75 |
| Item2 | 269403 | 67350.75 | 269403 |
67350.75 |
| Item3 | | | |
|
| Item4 | | | |
|
| Item5 | 10300 | 2575.00 | |
|
#+TBLFM: $3=if(typeof(0.25*$2) == 12, string(""),0.25*$2); E
f-2::$5=if(typeof(0.25*$4) == 12, string(""),0.25*$4); E f-2
Which is terrible.
Any idea how to avoid this?
Thanks and regards
Uwe Brauer
--
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 ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
- How to exclude colum titles from calculations,
Uwe Brauer <=