From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: table and a if structure Date: Wed, 06 Jun 2018 15:01:28 +0200 Message-ID: <87zi0883x3.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQY4N-0000wh-6e for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 09:01:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQY4I-0000ST-CR for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 09:01:43 -0400 Received: from [195.159.176.226] (port=49199 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQY4I-0000Ro-29 for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 09:01:38 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fQY28-0002qZ-Aj for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 14:59:24 +0200 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 I have the following table | name | value1 | value2 | result | |--------+--------+--------+-------------| | first | 4 | 5 | 4.2 | | second | NP | 5 | 0.8 NP + 1. | #+TBLFM: $4=if("$2" == "NP",string("NP"),0.8*$2+0.2*$3) The idea is if the second column has an entry NP then no operation should be applied. But my table does not work. So it seems that there is some syntax error. Thanks Uwe Brauer