|
From: | Marco Wahl |
Subject: | Re: [O] problem with lookup, count several string in one (or more) columns. |
Date: | Tue, 05 Jul 2016 08:50:44 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Uwe Brauer <address@hidden> writes: > Hello > > I tried to follow the instructions found in > http://orgmode.org/worg/org-tutorials/org-lookups.html > > So I want to count all strings NP MH in the following table > According to the instructions, the following will search the string MH. > > | group | round 1 | round 2 | > |-------+---------+---------| > | A | | 2.4 | > | B | 4.7 | 11 | > | C | | MH | > | D | 5 | | > | E | | 7.2 | > | F | 3.2 | 4.3 | > | G | NP | 4.4 | > | H | NP | 8 | > | I | NP | 8 | > |-------+---------+---------| > | total | MH | 1 | > > #+TBLFM: @>$3='(length(org-lookup-all "MH" '(@address@hidden) nil)); > > So I could repeat that for the string NP as well but how can I search > for both (or more) strings at once? What about #+TBLFM: @>$3='(+ (length(org-lookup-all "NP" '(@address@hidden) nil)) (length(org-lookup-all "MH" '(@address@hidden) nil))); ? Best regards, -- https://marcowahl.github.io
[Prev in Thread] | Current Thread | [Next in Thread] |