在另一列的值唯一的情况下,如何对一个列中的值进行计数? [英] How can I do a countif for a value in one column where the values for another column are unique?
本文介绍了在另一列的值唯一的情况下,如何对一个列中的值进行计数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
A B C
ID Charge Value
01 100 40
01 100 40
01 200 20
02 100 40
如果我有一个电子表格链接到上述电子表格,并且我想查找 01
进行充电并执行= countif(A:A,'01')的次数,它会说3但是,我正在寻找 01
有多少次唯一费用.在上面的代码中,我们看到多行显示100.我希望答案显示2,因为它们有2个唯一的费用ID.
If I have a spreadsheet linking to the above spreadsheet and I wanted to lookup the number of times 01
had a Charge and did =countif(A:A,'01') it would say 3. However, I'm looking for how many times 01
had a unique charge. In the above we see multiple rows for 100. I want the answer to show 2, because they had 2 unique charge IDs.
我如何才能获得 01
的唯一费用计数?
How can I just get a count for 01
for unique charges?
推荐答案
使用Excel365,您可以尝试-
With Excel365 you can try-
=CountA(Unique(Filter(B2:B5,A2:A5="01")))
这篇关于在另一列的值唯一的情况下,如何对一个列中的值进行计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文