From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: problem with empty column Date: Fri, 05 Jan 2018 09:28:30 +0100 Message-ID: <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]:49365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXNMx-0000En-Mu for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 03:28:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXNMu-0006lY-7H for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 03:28:51 -0500 Received: from [195.159.176.226] (port=38662 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXNMt-0006kX-Vb for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 03:28:48 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eXNKp-0000vX-W3 for emacs-orgmode@gnu.org; Fri, 05 Jan 2018 09:26:39 +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 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