首页 > 解决方案 > How to count the number of repetition of different values in Excel?

问题描述

I have data set which is for example like this:

axz 
www 
www 
axz 
hhh 
mjk 
www 

And I want to get something like this:

axz 2
www 3
www 3
axz 2
hhh 1
mjk 1
www 3

I know to get that with countif function, but only for a few specific values. Now I have much more values, so It's not practical for me to use countif where I suppose to know every value which occurs.

标签: excelcount

解决方案


您说“在我想知道发生的每个值的地方使用 countif 对我来说是不切实际的”。但您也可以使用单元格作为标准。

假设您的 A 列包含值 axz,www,... 您可以使用下面的公式来获取您的计数:

=COUNTIF(A:A,A1)

...然后只需“拉”下单元格,这将自动更新标准。

在此处输入图像描述


推荐阅读