Question

I've got a table with multiple floating point rows and I'd like to round each of them.

+------------+-------------|
| 445.211219 | 1679.315626 |
| 415.789521 | 1566.561511 |
| 435.918622 | 1689.427872 |
+------------+-------------|
| 424.203660 | 1592.293310 |
| 400.164057 | 1628.415460 |
| 410.473361 | 1507.498568 |
+------------+-------------|
| 463.528003 | 1593.778433 |
| 459.144001 | 1487.695008 |
| 338.498464 | 1459.291475 |

So my first approach was

#+TBLFM: $3=round($3) $4=round($4)

But that produces

+----+-------------|
|  0 | 1679.315626 |
|  0 | 1566.561511 |
|  0 | 1689.427872 |
+----+-------------|
|  0 | 1592.293310 |
|  0 | 1628.415460 |
|  0 | 1507.498568 |
+----+-------------|
|  0 | 1593.778433 |
|  0 | 1487.695008 |
|  0 | 1459.291475 |

Two lines

#+TBLFM: $3=round($3)
#+TBLFM: $4=round($4)

doesn't work either - only the first one is applied.

How do I define formulae for more than one column?

Was it helpful?

Solution

The formulas are ::-separated. Try :

#+TBLFM: $3=round($3)::$4=round($4)

You may want to use these commands from the manual to edit formulas, rather than editing the TBLFM line by hand, they're very convenient :·)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top