Hi Jiang, "jiangzuo...@gmail.com" <jiangzuo...@gmail.com> writes:
> Formulas reference in a long table are very easy corrupted by > manually inserting. so, I think, refer using name instead of num. is > better. > > but how to refer the rows by name? > > For example, > > |---+------+---------+--------+---------+------| > | ! | date | amount | item | account | note | > | | date | amount | item | account | note | > |---+------+---------+--------+---------+------| > | _ | | bamount | | | | > | | | 12 | lunch | pocket | | > | | | 59 | dinner | pocket | | > | ^ | | eamount | | | | > |---+------+---------+--------+---------+------| > | _ | | total | | | | > | # | | #ERROR | | | | > |---+------+---------+--------+---------+------| > #+TBLFM: $total=vsum($bamount..$eamount);%.2f > > I'd expected $bamount..$eamount is the range of > @II$amount..@III$amount, but it's not. $bamount and $eamount are > epxanded to the values too early. I see the problem you have. To my understanding, field names like "bamount" and "eamount" refer to the _value_ of the above/below field, not to the _position_. So when the formula is computed, these names are replaced by values, not by position -- hence the result you have. I'm not sure this is by design. Maybe Carsten can tell more, and/or have a look in this issue when he's back. Best, -- Bastien