...
11.5 Enumeration grouping
Here below is a data table:
The task is to put Apple, Banana and Orange in a group and name it Fruits, put Pork, Beef and Mutton in a group and name it Meats, and put the rest of the goods in a group and name it Others, and then count the total sales of each group:
=spl("=E(?1).groups(if([""Apple"",""Banana"",""Orange""].pos(Goods)!=null:""Fruits"", [""Pork"",""Beef"",""Mutton""].pos(Goods)!=null:""Meats""; ""Others""):Goods; sum(Sales):Sales)", A1:B14)