emacs-orgmode
[Top][All Lists]
Advanced

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

Re: how to add a range of columns


From: Uwe Brauer
Subject: Re: how to add a range of columns
Date: Fri, 02 Jul 2021 11:23:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Friday,  2 Jul 2021 at 10:42, Uwe Brauer wrote:
>> I'd like to add a range values of two columns something like this 

> I am not sure what you are trying to achieve.  Would you please explain
> in more detail?  It kind of looks like you are trying to add columns 1
> and 2 to get column 3?  If so, you could simply have:

> #+TBLFM: $3=$1+$2

No I only want to add the parts of column $1 and $2 that are between the
two hlines (I wanted to use hline @I and @II and not the explict row
numbers, since this is more convenient. But it does to work with
explicit row numbers 

I added a column to indicate what I want to add and want not. Is this
better explained?

#+begin_src elisp

#+Name: check
| User1 | User2 | Result | don't add |
|-------+-------+--------+-----------|
|     1 |     3 | [4]    | add       |
|     4 |     8 | [4]    | add       |
|     9 |     3 | [4]    | add       |
|-------+-------+--------+-----------|
|     7 |     9 | [4]    | don't add |
#+TBLFM: @I$3..@II$3=@I$1..@2$1+@I$2..@II$2
#+end_src





Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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