[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] delete, add new row
From: |
henry atting |
Subject: |
Re: [O] delete, add new row |
Date: |
Fri, 02 Dec 2011 10:59:01 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
Jonathan Leech-Pepin <address@hidden> writes:
> I'm not sure as to the reason why it does so, but based on your
> example, the formula is referencing the specific cell itself, rather
> than the relative position of the cell. If you change your formula to
> use a relative reference, it will continue to work even when you add,
> remove and move the rows.
>
> #+TBLFM: @2$3..@>$3=vmean(@address@hidden);%.1f
> or
> #+TBLFM: @2$3..@>$3=vmean(@<<address@hidden);%.1f
> will both provide you with the result you seem to be looking for. The
> former uses your (first) horizontal line as the starting point,
> whereas the latter uses the 2nd row from the top.
>
> Regards,
> Jonathan
>
> On Thu, Dec 1, 2011 at 12:42, henry atting <address@hidden> wrote:
>
> Suppose I have this table:
>
> | month | expenses | average |
> |-------+----------+---------|
> | 1 | 20 | |
> | 2 | 30 | 25.0 |
> | 3 | 40 | 30.0 |
> #+TBLFM: @3$3..@>$3=vmean(@address@hidden);%.1f
>
> Then I want to delete the second row and add a new one at the
> bottom.
> If I do so I get `#ERROR' on every recalculation.
>
> | month | expenses | average |
> |-------+----------+---------|
> | 2 | 30 | #ERROR |
> | 3 | 40 | #ERROR |
> | 4 | 50 | #ERROR |
> #+TBLFM: @2$3..@>$3=vmean(@address@hidden);%.1f
>
> If I push the second row to the bottom the
> result is as if the last row is still the second one.
>
> | month | expenses | average |
> |-------+----------+---------|
> | 2 | 30 | 30.0 |
> | 3 | 40 | 30.0 |
> | 1 | 20 | 20.0 |
> #+TBLFM: @2$3..@>$3=vmean(@address@hidden);%.1f
>
Ah, I see the problem; and thanks, it works fine now.
henry
--
http://literaturlatenight.de