[O] Spreadsheet: Conditionally apply formula to cell?

2016-03-19 Thread Loris Bennett
Hi,

If I have

| 1 | 2 | 13 |
|   |   | 10 |
#+TBLFM: $3=$1+$2+10

is there a way to suppress calculation of column 3 if, as in row 2, the
entry in column 1 is empty?

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] Spreadsheet: Conditionally apply formula to cell?

2016-03-19 Thread Christian Moe

Hi,

Yes, there is. See the manual on logical operations in "Formula syntax
for Calc", which gives an example for almost exactly the same thing.

 | 1 | 2 | 13 |
 |   |   ||
 #+TBLFM: $3=if("$1" == "nan" || "$2" == "nan", string(""), $1+$2+10);E

Yours,
Christian

Loris Bennett writes:

> Hi,
>
> If I have
>
> | 1 | 2 | 13 |
> |   |   | 10 |
> #+TBLFM: $3=$1+$2+10
>
> is there a way to suppress calculation of column 3 if, as in row 2, the
> entry in column 1 is empty?
>
> Cheers,
>
> Loris