emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] 2 questions on tables


From: Michael Brand
Subject: Re: [O] 2 questions on tables
Date: Mon, 15 Jul 2013 10:41:35 +0200

Hi Andreas

On Mon, Jul 15, 2013 at 8:47 AM, Andreas Leha
<address@hidden> wrote:
> I have two questions concerning tables in orgmode:

I try to answer your first question:

> 1. What is the best way to handle missing values?
>    I have the problem, that missing values ("") are treated as "0" when they
>    appear in a formula.
>    Entering ("nil") instead helps a bit, but does not propagate,
>    i.e. nil + 1 results in 0.
>    Can I do better?

Is this what you are looking for?:

| Tomato |      |      |
| Pear   | 3.00 | 6.00 |
#+TBLFM: $3 = if("$2" == "nan", string(""), 2 * $2 +.0); E f-2

For "E" see
http://orgmode.org/org.html#Formula-syntax-for-Calc
and for "+.0; f-2" see
http://orgmode.org/worg/org-faq.html#table-float-fraction

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]