merge (sum) rows by specific cell/ summ rows in record

574 views
Skip to first unread message

Филипп Кац

unread,
Oct 1, 2013, 7:42:14 AM10/1/13
to openr...@googlegroups.com
Hello!

I have several rows in each record - how do I merge them, adding numerical cells ?

I have something like this:

apple    | 10 | 13  | 14
apple    | 1   | 3   | 5
banana | 3   | 34 | 32
banana | 2   | 4   | 33

And need this:

apple | 11 | 16 | 19
banana | 5 | 38 | 65

Tom Morris

unread,
Oct 1, 2013, 2:55:16 PM10/1/13
to openr...@googlegroups.com
- sort on col #1
- re-order rows permanently (sort menu)
- blank down on col #1
- merge multi-valued cells on columns 2, 3, 4 using a separator of | (or anything else convenient and non-conflicting)
- transform cols 2, 3, 4 using the expression: sum(forEach(value.split('|'),x, x.toNumber()))

Tom
Reply all
Reply to author
Forward
0 new messages