[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Simple question re: use of conditional in cell formula
From: |
Michael Brand |
Subject: |
Re: [O] Simple question re: use of conditional in cell formula |
Date: |
Thu, 20 Feb 2014 22:02:56 +0100 |
Hi Subhan
On Thu, Feb 20, 2014 at 9:05 PM, Subhan Tindall
<address@hidden> 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