On Tue, Apr 21, 2015 at 10:13:53AM +0200, Michael Brand wrote: > Hi Jeffrey > > On Mon, Apr 20, 2015 at 3:35 PM, Jeffrey Brent McBeth <mcb...@broggs.org> > wrote: > > I'm looking for a way to reference a row or column on both the left > > side and right side of a table formula that is "easily" manipulable. > > As you noticed the left side is very limited compared to the right > side. The solution below keeps the left side simple. "x" is used as a > movable marker to indicate the beginning of the range: > > | F | A | B | C | > |---+---+---+----| > | x | 1 | 3 | 4 | > | | 2 | 4 | 69 | > |---+---+---+----| > | | 3 | | | > #+TBLFM: @>$2 = vsum(subvec(@I$2..@II$2, find(@I$1..@II$1, x), 0)); E > :: @<<$4..@>>$4 = if("$1" == "(x)", $-2 + $-1, $0)
That is awesome. subvec and if seem to be two very powerful tools that I've missed as I've trawled the documentation. Thank you so much. Jeff -- "The man who does not read good books has no advantage over the man who cannot read them." -- Mark Twain