From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Loris Bennett" Subject: Re: problem with empty column Date: Fri, 05 Jan 2018 10:25:31 +0100 Message-ID: <87fu7ky7w4.fsf@hornfels.zedat.fu-berlin.de> References: <87h8s0yaj5.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXOG5-00049S-GK for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 04:25:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXOG2-0005Rx-A0 for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 04:25:49 -0500 Received: from [195.159.176.226] (port=46497 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXOG2-0005QR-21 for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 04:25:46 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eXODv-0004AZ-Cn for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 10:23:35 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Uwe Brauer writes: > Hi > > Consider please the following table > > > > | Name | E1 | E2 | E3 | E4 | Res | > |--------+----+----+----+----+-----| > | Entry1 | | | | | NP | > | Entry2 | 10 | 20 | 30 | 40 | 10 | > > #+TBLFM: $6=if("$2" == "nan" , string("NP"),($2+$3+$4+$5)/10);E > > The last column contains a string NP if the corresponding cell in the > second column is empty. > > However when I consider > > | 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 > > The last row behaves strangely the cell in the second column is *not* > empty but the cell in the third one is, nevertheless the cell in the > last column contains the string nan, which I don't understand. > > Any help would be appreciated > > Thanks > > Uwe Brauer The empty column for Entry3 is in column 3 and not column 2. Try toggling the Col/Row numbers. Cheers Loris -- This signature is currently under construction.