From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Simple question re: use of conditional in cell formula Date: Thu, 20 Feb 2014 22:02:56 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGalo-0001I1-H2 for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 16:03:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGall-0001Ws-QC for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 16:03:00 -0500 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:47790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGall-0001Wk-L8 for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 16:02:57 -0500 Received: by mail-qc0-f171.google.com with SMTP id x3so4270392qcv.30 for ; Thu, 20 Feb 2014 13:02:56 -0800 (PST) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Subhan Tindall Cc: Org-Mode Hi Subhan On Thu, Feb 20, 2014 at 9:05 PM, Subhan Tindall wrote: > What I'd like to do, but can't seem to find the proper syntax for, > is use a conditional assignment so that when there is no Effort > value only a blank, or "***", or similar is in the destination cell. > SImilarly, when there is no value in one of the time sub-columns the > corresponding cell is left blank Are you looking for this?: In the manual: http://orgmode.org/manual/Formula-syntax-for-Calc.html if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E Sum of the first two columns. When at least one of the input fields is empty the Org table result field is set to empty. In action: Look at the page with the Worg tutorials and in the spreadsheet section follow the link to the "Emacs Regression Test (ERT) for Org tables" with example use cases for TBLFM: http://orgmode.org/worg/org-tutorials/index.html#Spreadsheet In the ERT it is test-org-table/empty-field, specifically "Test if several fields are empty, else do a calculation". > And, while I'm on the topic, is there anyway way to get a column in > the clocktable to display the sum of all Effort estimates for it's > displayed subtrees? IE like this: I can't follow, maybe because I don't use clocking. Maybe you want to use the hierarchical sum of a property in column view, here the property "Effort". See http://orgmode.org/manual/Column-attributes.html and http://orgmode.org/manual/Capturing-column-view.html Michael