Hello, Daniel Gerber <daniel.g.ger...@gmail.com> writes:
> The docs say that the REF argument to remote can be "@3$3 or $somename, > valid in the referenced table". So, adapting the tutorial, the last > column here should get the same values as the second one, right? > > > | currency | rate (@r$c ref) | rate (named ref) | > |----------+-----------------+------------------| > | eur | 1 | nil | > | usd | 0.77 | nil | > | sek | 0.12 | nil | > | sek | 0.12 | nil | > | sek | 0.12 | nil | > | nok | 0.14 | nil | > | | nil | | > #+TBLFM: $2='(org-lookup-first $1 '(remote(rates,@2$2..@>$2)) > '(remote(rates,@2$3..@>$3)))::$3='(org-lookup-first $1 > '(remote(rates,$abbr)) '(remote(rates,$euros))) > > > #+TBLNAME: rates > | ! | abbr | euros | > |---+------+-------| > | | eur | 1 | > | | nok | 0.14 | > | | sek | 0.12 | > | | usd | 0.77 | Actually, wrong. $abbr (respectively $euros) in this case is equivalent to $2 (respectively $3). So your formula becomes $3='(org-lookup-first $1 '(remote(rates,$2)) '(remote(rates,$3))) However, $2, or $3, are not valid range references so you do not get vector of values. However, the following should work as expected '(org-lookup-first $1 '(remote(rates,@2$abbr..@>$abbr)) '(remote(rates,@2$euros..@>$euros))) Regards, -- Nicolas Goaziou