14

You are looking for remote table references: #+TBLNAME: tab1 | Nº | Description | Value | |-----+-------------+-------| | | TOTAL | 1 | ... #+TBLNAME: tab10 | Nº | Description | Value | |----+-------------+-------| | | TOTAL | 2 | tab-summary | Description | Value | |-------------------+-------| | Total of Table 1 | ...


9

Two notes to answer your questions. The first answers your question directly. Take a look at The Org Manual and its section on References. In short: use @> to refer to the last row. The example provided in the manual says: @>$5 [refers to the] field in the last row, in column 5 Referring to the last-to-one row is not possible in this way, as far ...


5

This seems to work for me: | plan | a | b | c | |-----------+----+---+---| | concern 1 | -1 | 0 | 2 | | concern 2 | 2 | 1 | 1 | | concern 3 | 0 | 2 | 1 | |-----------+----+---+---| | score: | 1 | 3 | 4 | #+TBLFM: @>$<<..$>=vsum(@I..@II) $<<..$> means "the range of columns starting from the second and up to the last." See ...


4

quickly calculating If you're just using constants, like your example 13*57, and not referring to other cells in the org table, you can use quick-calc to do this calculation. M-x quick-calc reads an expression from the minibuffer, calculates it, and displays the result in the minibuffer. inserting at point With a prefix argument, it will also insert the ...


4

Your guess inner is right. The first two operands of inner are the multiplication and the summation operator, respectively. The remaining two arguments are the vectors for the inner product. The summation operator is add and the multiplication operator is mul. Your table inclusive the table-formula should look like: | | | col1 | enable | |---+-----...


4

You are probably better off using Lisp formulas for things like this. As @db48x's answer points out, there are a couple of cooks in that kitchen and what they are doing is not always obvious. Formula debugging can help but it is not always effective (I presume that's how @db48x discovered the "(a)" thing, but that may not be the case). I find the ...


3

(describe-variable 'org-table-formula-constants) #+TBLFM: $3='(* $2 $exchange);N


3

I don't know exactly what's going on here, but after doing a little debugging I found that this works: | a | | | b | | #+TBLFM: $2=if("$1"=="(a)", 1, 0) It looks to me like it's doing algebraic simplification in order to get an answer, and if that fails it can be left with a more complicated form than you expected. b = a ? 1 : 0 is a ...


3

As of org-mode 9 you can only do this manually: Place the cursor on the respective #+tblfm: lines and press C-c C-c. Here's the corresponding manual section, which is telling you that org considers only the first #+tblfm: line when otherwise updating the table formulas. When the amount of formulas is getting too cumbersome to edit the #+tblfm: line itself ...


3

The formulas are evaluated by the calc package, and its manual is the goto place for functions lookup. (This manual can be quite overwhelming, but you will only visit a few pages most of the time.) Usually, functions that operate on a single vector (in your case you want to sum coefficients of a vector) are prefixed by v, and indeed here vsum is what you're ...


2

If you're more comfortable with elisp than calc functions, you can also do something like this: '(apply #'+ '(@2$5..@5$5));N See the Org manual for more details.


2

Basically every table manipulating function is updating formulas. For example : M-S-right includes a new column (before the cursor) updating formulas to the new number of columns. C-u C-c * is recalculating all your formulas in the spreadsheet. Also a C-c C-c on a #+tblfm: line is (re)applying all the formulas in the table. For more advanced stuff, like ...


2

Simulate LHS Column Name Assignments Simulate Left Hand Side (LHS) column name assignments using named fields and a keyboard macro. Update your example table and formulas as follows: | | Runde | 0 | 1 | 2 | Resultat | % | |---+-------+----+----+----+----------+------------| | ! | | c0 | c1 | cn | | | | _ | name | ...


2

Everything is possible since you can arbitrarily modify a buffer temporarily before applying a command with cmdbufmod from the answer to the question about a single tblfm for multiple org tables. The following code defines an :around advice org-table-multi-tblfm for org-table-recalculate that joins successive #+TBLFM:-lines before running org-table-...


2

You could use the lisp function memq for the lookup as demonstrated in the Org example below. I use the Literal mode switch L. This imposes the restriction that there are only one-word identifier in the food column. Furthermore I use quote to avoid evaluation of the symbols in the table formula. Please, use the table debugger to see what is going on (Tbl ...


2

"precision" refers to the number of floating point digits Calc does its internal computations with. The floating point format specifies how many digits to print after the decimal point. The default value is (defcustom org-calc-default-modes '(calc-internal-prec 12 calc-float-format (float 8) calc-angle-mode deg ...


1

The Org mode spreadsheet is not like Excel: you don't create formulas in one cell and then propagate them to other cells (well, you can - do C-h i g (org)Field and range formulas, but propagating them is basically a matter of cutting and pasting). You can instead use a #+TBLFM after the table to do all that: |------------+------------+------------+-----------...


1

You can either use the calc syntax or the elisp syntax. | x | calc syntax | elisp syntax | |---+-------------+--------------| | 1 | 0 | 0.0000 | | 2 | 0.6931 | 0.6931 | #+TBLFM: $2=log($1);n4::$3='(log $1);N%.4f Notice that the output format of the calc syntax depends on the ~/.emacs.d/calc.el parameters. (plist-put org-calc-...


1

I have found a satisfactory solution (of a sort) to the problem, without being able to exactly diagnose it, as explained in the above Update. The code I added to my .emacs file (which was needed anyway in order to avoid a frustratingly repetitive safety dialogue) is as follows: ;; load the code file defining the printer function num-to-cash (load-file &...


1

Defining Constant Values from Remote Org-Table Cell for Use in #+TBLFM: Initial Setup Create Named Table, e.g. other-table-name #+NAME: other-table-name | S | M | T | W | H | F | S | |---+---+---+---+---+---+---| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | Method 1 - Dynamically Define #+CONSTANTS: using SRC Block Results In this example, the programming language used ...


1

You may try the orgtb-aggregate package available on Melpa. It will create new tables from yours. In this example, partial sums are computed for similar values of enable: #+name: mytable | | | col1 | enable | |---+-------+------+--------| | | | 1 | 1 | | | | 3 | 0 | | | | | 0 | | | | 7 | ...


1

This is straightforward: use the EN options, as follows: @7$3=vsum(@I..@II*@I$+1..@II$+1);EN


1

OK. My fault. When I was revising the proposal of @Melioratus, I noticed that in some formulas I was not including the two dots to indicate range, specifically in the calculation of the fields that yield =nil=. Here are the original formulas: #+TBLFM: $5='(org-lookup-first $no '(remote(E1Ap1,@I$no@II$no)) '(remote(E1Ap1, @I$tot..@II$tot))) :: $6='(org-...


1

if the formula in cell C1 is (+ A1 B1), I would like to be able to copy the formula from C1 into C2 and have the formula be (+A2 B2) instead of (+ A1 B1). That's how it does work, though. If I set a formula (+ A1 B1) in cell C1, then mark and copy that cell, and yank it into cell C2, the resulting formula in C2 is (+ A2 B2). This is using C-SPC <right> ...


1

I subscribe to https://emacs.stackexchange.com/users/454/phils 's recommendation to file a bug report. In the meantime you could try this slightly modified version of ses-mark-column. (defun ses-mark-column () "Mark the entirety of current column as a range." (interactive) (ses-check-curcell 'range) (let ((col (cdr (ses-sym-rowcol (or (car-safe ...


Only top voted, non community-wiki answers of a minimum length are eligible