[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] problem with empty column
From: |
Michael Brand |
Subject: |
Re: [O] problem with empty column |
Date: |
Fri, 5 Jan 2018 14:55:33 +0100 |
Hi Uwe
On Fri, Jan 5, 2018 at 1:44 PM, Uwe Brauer <address@hidden> wrote:
> But fails if there is a row like this
>
> | Name | E1 | E2 | E3 | E4 | Res |
> |--------+----+----+----+----+-----|
> | Entry1 | | | | | NP |
> | Entry2 | 10 | 20 | 30 | 40 | 10 |
> | Entry3 | 10 | | 20 | 30 | nan |
> #+TBLFM: $6=if("$2" == "nan", string("NP"),($2+$3+$4+$5)/10);E
I think you are looking for this:
| Name | E1 | E2 | E3 | E4 | Res |
|--------+----+----+----+----+-----|
| Entry1 | | | | | NP |
| Entry2 | 10 | 20 | 30 | 40 | 10 |
| Entry3 | 10 | | 20 | 30 | NP |
#+TBLFM: $6 = if(typeof(vsum($2..$5)) == 12 , string("NP"),
vsum($2..$5) / 10); E
See the example
if(typeof(vmean($1..$7)) == 12, string(""), vmean($1..$7); E
in the manual.
Michael