I'd like to produce a "subtotal" of a table where the subtotal function is string concat instead of some numeric function (count, sum, average).
For example, consider this table:
I want the following result:
To me, this seems like "concat" (or "join") lifted over subtotaling. But I don't think Excel really understands functional programming (no matter what some people have claimed). So how can I do this (especially, how can I do this taking advantage of the Subtotal menu item that inserts all the subtotaling formulas automatically, even if I have to subsequently edit the formulas to get what I want to work).
And, in fact, Excel is very powerful with oodles of features. So can I achieve this in some other way besides subtotaling? (I would prefer non-scripting solutions.)
And, also, Excel isn't the only tool in the toolbox. Suppose I had this table in a CSV file. Is there a way to do this with standard Unix utilities (e.g.,
awk could handle it, how would that look)?