Suppose I have this org-mode table:
| Ativo | Valor R$ | % Percentual |
|-------+----------+--------------|
| A | 13.0 | 0.1300 |
| B | 33.0 | 0.3300 |
| C | 54.0 | 0.5400 |
| TOTAL | 100.0 | 1.0 |
#+TBLFM: @2$3='(format "%0.4f" (/ @2$2 @5$2));N
#+TBLFM: @3$3='(format "%0.4f" (/ @3$2 @5$2));N
#+TBLFM: @4$3='(format "%0.4f" (/ @4$2 @5$2));N
#+TBLFM: @5$2='(apply '+ '(@2$2..@4$2));N
#+TBLFM: @5$3='(apply '+ '(@2$3..@4$3));N
Suppose the value of A
was changed to be 113
instead of 13
:
| Ativo | Valor R$ | % Percentual |
|-------+----------+--------------|
| A | 113.0 | 0.1300 |
| B | 33.0 | 0.3300 |
| C | 54.0 | 0.5400 |
| TOTAL | 100.0 | 1.0 |
#+TBLFM: @2$3='(format "%0.4f" (/ @2$2 @5$2));N
#+TBLFM: @3$3='(format "%0.4f" (/ @3$2 @5$2));N
#+TBLFM: @4$3='(format "%0.4f" (/ @4$2 @5$2));N
#+TBLFM: @5$2='(apply '+ '(@2$2..@4$2));N
#+TBLFM: @5$3='(apply '+ '(@2$3..@4$3));N
This means that to have a correct table, I need to update the other values.
Usually, I put the cursor over each line starting with TBLFM
and I execute org-ctrl-c-ctrl-c
.
I would like to execute all of the formulas. I tried marking the region with all the table formulas with C-SPC
and then executing C-c C-c
. But, it did not work. The mini-buffer echoes:
user-error: ‘C-c C-c’ can do nothing useful here
How can I execute multiple TBLFM
expressions at once?
After updating it, this is the expected result for me:
| Ativo | Valor R$ | % Percentual |
|-------+----------+--------------|
| A | 113.0 | 0.5650 |
| B | 33.0 | 0.1650 |
| C | 54.0 | 0.2700 |
| TOTAL | 200.0 | 1.0 |
#+TBLFM: @2$3='(format "%0.4f" (/ @2$2 @5$2));N
#+TBLFM: @3$3='(format "%0.4f" (/ @3$2 @5$2));N
#+TBLFM: @4$3='(format "%0.4f" (/ @4$2 @5$2));N
#+TBLFM: @5$2='(apply '+ '(@2$2..@4$2));N
#+TBLFM: @5$3='(apply '+ '(@2$3..@4$3));N