列的不同值,并对每个不同的值进行计数 [英] Distinct value of a column and do a count on each distinct value
问题描述
我知道如何计数这个列的独特价值,但是我也想做一个不同的值的数量。有一个简单的方法吗?
谢谢。
考虑到以下示例:
要获得唯一的值,并且发生每个唯一的值,你可以执行以下操作:
图像很小,所以这里是输入和拖动的公式:
FORMULAS
1。输入列B的第一个单元格
= IF(ISERROR(INDEX($ A $ 2:$ A $ 8,MATCH (0,INDEX(COUNTIF($ B $ 1:B1,$ A $ 2:$ A $ 8),0,0),0))), ,INDEX($ A $ 2:$ A $ 8,MATCH(0,INDEX (COUNTIF($ B $ 1:B1,$ A $ 2:$ A $ 8),0,0),0)))
在列B中的公式。您将获得唯一值列表。
2。输入列C的第一个单元格
= COUNTIF($ A $ 2:$ A $ 8,B2)
将公式拖到列C之下。您将获得每个唯一值的出现次数。
RESULT
这是你会得到的:
< img src =https://i.stack.imgur.com/QHxUP.jpgalt =enter image description here>
Hi I have a column like this.
I know how to count the number of distinct value of this column, but I also want to do a count on what is the number of different distinct value.Is there an easy way to do that?
Thanks.
Considering the following example:
To get the unique values, and the occurrences of each unique value, you can do the following:
The image is tiny, so here is are the formulas to type-in and drag down:
FORMULAS
1. Type in the first cell of column B:
=IF(ISERROR(INDEX($A$2:$A$8,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$8),0,0),0))),"",INDEX($A$2:$A$8,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$8),0,0),0)))
Drag the formula down the column B. You will get a list of unique values.
2. Type in the first cell of column C:
=COUNTIF($A$2:$A$8,B2)
Drag the formula down the column C. You will get the number of occurrences of each unique value.
RESULT
This is what you will get:
这篇关于列的不同值,并对每个不同的值进行计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!