人生若精通excel,何至秋风悲画屏

  • 主题发起人 主题发起人 TIFF
  • 开始时间 开始时间

TIFF

晴空一鹤排云上~~遥引诗情到碧霄
VIP
注册
2011-09-16
消息
30,409
荣誉分数
5,901
声望点数
273
请问一个excel的问题

用下面这个简单的table做一个例子。如果我想count有多少个region 有item1 和item2, 正确答案是,有item1 的region有两个,US and Canada, 有item2的也是一样。

简单的table容易看,但是如果数据量大,只能依靠function来数。用我已知的count function, 会数重复,会说有item1 的有3个region, 有item2的有4个region。 请问怎么样才能让count不去重复数同样的region?就是要在前面加个判断,如果都是US,只数一次,都是Canada,也只数一次。谁知道啊?先谢谢了。

upload_2013-12-20_12-45-52.png
 
what is granularity of the table then? what are the difference of 3 US items or of 3 Canada items? It causes readability problem.
 
what is granularity of the table then? what are the difference of 3 US items or of 3 Canada items? It causes readability problem.

The 3 different US items are categorized by other criteria. I need to know if I can set a condition in my count function to identify duplicated records in reference columns. In this case, the reference column is the region column and the records are US and Canada.
 
谴责一下技术坑。
 
in sql, it is always count distinct

or different pivot table views?
 
没仔细看,如果比较复杂的运算,用VBA编个小function就是了。
 
这个要顶,楼主举一反三嘛
 
啥? coding man ?

Maybe. 干锅做好了嘛?等我把这个搞定了,去找你一起吃去啊。
 
try this:
=SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000&""))
 
后退
顶部