获取一列用逗号分隔的值的计数和唯一值? [英] Getting the count and unique values of a column of comma separated values?
本文介绍了获取一列用逗号分隔的值的计数和唯一值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我只有下面的A列
+ +
A | B | C
+--------------|---------|----------+
| |
X, Y, Z | X | 3
| |
X, Z | Y | 2
| |
X, Y | Z | 2
+ +
如何生成列B和C-其中B列从A中获取唯一元素,而C列生成这些值的计数.
How do I generate columns B and C - where the B column grabs the unique elements from A, and the C column generates a count of those values.
推荐答案
=ArrayFormula(QUERY(TRANSPOSE(SPLIT(JOIN(",",A:A),",")&{"";""}),"select Col1, count(Col2) group by Col1 label count(Col2) ''",0))
这篇关于获取一列用逗号分隔的值的计数和唯一值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文