Google Sheet Query - Group / concatenate multiple rows

别说谁变了你拦得住时间么 提交于 2019-12-13 02:26:51

问题


I'm running a pretty simple query with a sum and group by, but I'd like to aggregate multiple distinct values from the rows into a single row and column. I've looking to concatenate all those values together.

Take a look at my sample; https://docs.google.com/spreadsheets/d/1GcYbwAujKQFpolTQb9h35mlP5mxmeiWJmPnp4OemNuU/edit?usp=sharing

I have my query in F1 and the desired output in F11.


回答1:


You can use the filter and join functions to help:

To get a unique list of names:

=UNIQUE(A3:A)

To join the widgets:

=join(",",filter(B:B,A:A=E3))

To sum the values:

=sum(filter(C:C,A:A=E3))



来源:https://stackoverflow.com/questions/36048134/google-sheet-query-group-concatenate-multiple-rows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!