Skip to main content
removed redundant words
Source Link

Can I make table2 automatically recalculate a remote() formula when I modify data in table1?

I have the below tables at the moment and the first table is automatically recalculated when I press TAB (thanks to the "#" in the first column), but the second one it's only recalculated when move my cursor over it and press TAB in there as well.

I would like to have it recalculated when I change (TAB) the first table.

#+NAME: table1
| # | + Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |  3110 |    295 |
| # | unit2   |       |        |
| # | unit3   |       |        |
|---+---------+-------+--------|
| # | - Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |   -40 |        |
| # | unit2   |  -105 |        |
| # | unit3   |   -26 |        |
|---+---------+-------+--------|
| * | TOTAL:  |  2939 |    295 |
|---+---------+-------+--------|
#+TBLFM: @9$3=vsum(@-1..@1);EN::@9$4=vsum(@-1..@1);EN

#+NAME: table2
| # | TOTAL + |  3405 |
| # | TOTAL - |  -171 |   
#+TBLFM: @1$3=vsum(remote(table1,@I$3..@II$3))+vsum(remote(table1,@I$4..@II$4));EN::@2$3=vsum(remote(table1,@III$3..@IIII$3))+vsum(remote(table1,@III$4..@IIII$4));EN

I am aware that it might be possible using elisp code but would like to have it work with only calc syntax, if possible.

Can I make table2 automatically recalculate a remote() formula when I modify data in table1?

I have the below tables at the moment and the first table is automatically recalculated when I press TAB (thanks to the "#" in the first column), but the second one it's only recalculated when move my cursor over it and press TAB in there as well.

I would like to have it recalculated when I change (TAB) the first table.

#+NAME: table1
| # | + Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |  3110 |    295 |
| # | unit2   |       |        |
| # | unit3   |       |        |
|---+---------+-------+--------|
| # | - Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |   -40 |        |
| # | unit2   |  -105 |        |
| # | unit3   |   -26 |        |
|---+---------+-------+--------|
| * | TOTAL:  |  2939 |    295 |
|---+---------+-------+--------|
#+TBLFM: @9$3=vsum(@-1..@1);EN::@9$4=vsum(@-1..@1);EN

#+NAME: table2
| # | TOTAL + |  3405 |
| # | TOTAL - |  -171 |   
#+TBLFM: @1$3=vsum(remote(table1,@I$3..@II$3))+vsum(remote(table1,@I$4..@II$4));EN::@2$3=vsum(remote(table1,@III$3..@IIII$3))+vsum(remote(table1,@III$4..@IIII$4));EN

I am aware that it might be possible using elisp code but would like to have it work with only calc syntax, if possible.

Can I make table2 automatically recalculate a remote() formula when I modify data in table1?

I have the below tables and the first table is automatically recalculated when I press TAB (thanks to the "#" in the first column), but the second one it's only recalculated when move my cursor over it and press TAB in there as well.

I would like to have it recalculated when I change (TAB) the first table.

#+NAME: table1
| # | + Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |  3110 |    295 |
| # | unit2   |       |        |
| # | unit3   |       |        |
|---+---------+-------+--------|
| # | - Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |   -40 |        |
| # | unit2   |  -105 |        |
| # | unit3   |   -26 |        |
|---+---------+-------+--------|
| * | TOTAL:  |  2939 |    295 |
|---+---------+-------+--------|
#+TBLFM: @9$3=vsum(@-1..@1);EN::@9$4=vsum(@-1..@1);EN

#+NAME: table2
| # | TOTAL + |  3405 |
| # | TOTAL - |  -171 |   
#+TBLFM: @1$3=vsum(remote(table1,@I$3..@II$3))+vsum(remote(table1,@I$4..@II$4));EN::@2$3=vsum(remote(table1,@III$3..@IIII$3))+vsum(remote(table1,@III$4..@IIII$4));EN

I am aware that it might be possible using elisp code but would like to have it work with calc syntax, if possible.

Source Link

Org-mode table recalculation with a remote() formula using calc?

Can I make table2 automatically recalculate a remote() formula when I modify data in table1?

I have the below tables at the moment and the first table is automatically recalculated when I press TAB (thanks to the "#" in the first column), but the second one it's only recalculated when move my cursor over it and press TAB in there as well.

I would like to have it recalculated when I change (TAB) the first table.

#+NAME: table1
| # | + Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |  3110 |    295 |
| # | unit2   |       |        |
| # | unit3   |       |        |
|---+---------+-------+--------|
| # | - Units | value | value2 |
|---+---------+-------+--------|
| # | unit1   |   -40 |        |
| # | unit2   |  -105 |        |
| # | unit3   |   -26 |        |
|---+---------+-------+--------|
| * | TOTAL:  |  2939 |    295 |
|---+---------+-------+--------|
#+TBLFM: @9$3=vsum(@-1..@1);EN::@9$4=vsum(@-1..@1);EN

#+NAME: table2
| # | TOTAL + |  3405 |
| # | TOTAL - |  -171 |   
#+TBLFM: @1$3=vsum(remote(table1,@I$3..@II$3))+vsum(remote(table1,@I$4..@II$4));EN::@2$3=vsum(remote(table1,@III$3..@IIII$3))+vsum(remote(table1,@III$4..@IIII$4));EN

I am aware that it might be possible using elisp code but would like to have it work with only calc syntax, if possible.