[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] table, calc, reorder and protect calculation in one cell
From: |
Uwe Brauer |
Subject: |
[O] table, calc, reorder and protect calculation in one cell |
Date: |
Tue, 11 Jun 2019 11:35:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Hi
I have the following problem
This is my original table
The row starting with smith is calculated differently from the other two
* Orginal
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Adams | 5 | 5 | 10 |
| Miller | 6 | 2 | 8 |
| Smith | 9 | 1 | 1.7 |
,#+TBLFM: $4=$3+$2::@4$4=0.1*@4$2+0.8*@4$3
#+end_src
Now I reorder the table using the column C1
* Original reordered
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Smith | 9 | 1 | 10 |
| Miller | 6 | 2 | 8 |
| Adams | 5 | 5 | 4.5 |
,#+TBLFM: $4=$3+$2::@4$4=0.1*@4$2+0.8*@4$3
#+end_src
Everything looks fine, however when I recalculate the table calc follows
its definition and I obtain
* Original reordered recalculated
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Smith | 9 | 1 | 10 |
| Miller | 6 | 2 | 8 |
| Adams | 5 | 5 | 4.5 |
,#+TBLFM: $4=$3+$2::@4$4=0.1*@4$2+0.8*@4$3
#+end_src
Which is not what I want. So the question is this.
Is there any way to enhance the ordering of rows so that it is reflected
in the way the rows a calculated
I mean reordering should/could have produced
* Original reordered TBLFM changed
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Smith | 9 | 1 | 10 |
| Miller | 6 | 2 | 8 |
| Adams | 5 | 5 | 4.5 |
,#+TBLFM: $4=$3+$2::@2$4=0.1*@2$2+0.8*@2$3
#+end_src
Is this behavior possible? When I delete a row or a column, the TBLFM
is updated, could that be done for reordering?
Thanks
Uwe Brauer
- [O] table, calc, reorder and protect calculation in one cell,
Uwe Brauer <=