emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] $LR syntax in tables


From: Stephan Schmitt
Subject: Re: [Orgmode] $LR syntax in tables
Date: Wed, 12 Aug 2009 18:39:02 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)


Stephan wrote:
Andrew wrote:
I'm afraid I can't quite wrap my head around this puzzle. I have a little table:

| Budget       |  640 | 640 |
| Some expense | -165 | 475 |
  #+TBLFM: $3=$LR3+$2

So col C is supposed to add the previous line's col C to the current
line's col B.

However, it seems that $LR3 is referring to the _subsequent_ line not
the previous one. Is there a bug or just my misunderstanding?

Thanks.

Hi Andrew,

what you need is this:

|              |      |   0 |
| Budget       |  640 | 640 |
| Some expense | -165 | 475 |
#+TBLFM: address@hidden::@1$3=0

the LR-reference is for the last, that is, the bottom row.

You need the first row and the field formula for C1 in order to initialize the cumulative sum properly.

hth,
    Stephan


p.s.
another solution would be:

| Budget       |  640 |  640 |
| Some expense | -165 | -165 |
#+TBLFM: address@hidden::@address@hidden

Greetings,
        Stephan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]