From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: table, calc, reorder and protect calculation in one cell Date: Mon, 17 Jun 2019 08:07:40 +0200 Message-ID: References: <87blz4qxbm.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44057) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hckoI-0004f8-2K for emacs-orgmode@gnu.org; Mon, 17 Jun 2019 02:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hckoE-0002Vp-5G for emacs-orgmode@gnu.org; Mon, 17 Jun 2019 02:08:04 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:43764) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hckoA-0002Bz-Hk for emacs-orgmode@gnu.org; Mon, 17 Jun 2019 02:08:02 -0400 Received: by mail-lj1-x231.google.com with SMTP id 16so8024179ljv.10 for ; Sun, 16 Jun 2019 23:07:53 -0700 (PDT) In-Reply-To: <87blz4qxbm.fsf@mat.ucm.es> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode Hi Uwe On Tue, Jun 11, 2019 at 11:36 AM Uwe Brauer wrote: > Is this behavior possible? When I delete a row or a column, the TBLFM > is updated, could that be done for reordering? You may want to use something like this, (I knew the syntax for ~"$1"~ and used the formula debugger ~C-c {~ to find the syntax for ~"(Smith)"~): | name | C1 | C2 | Res | |--------+----+----+-----| | Smith | 9 | 1 | 1.7 | | Miller | 6 | 2 | 8 | | Adams | 5 | 5 | 10 | #+TBLFM: $4 = if("$1" == "(Smith)", 0.1 * $2 + 0.8 * $3, $3 + $2) Michael