【问题标题】:Looking for unique values then count values from another column with index and match and countif查找唯一值,然后使用索引和匹配和计数从另一列中计算值
【发布时间】:2020-03-17 22:48:32
【问题描述】:

我一直在努力使用索引和匹配公式以及 countif 来弄清楚如何在 B 列 (clacc_no) 中查找唯一值,然后计算与 order_no (A 列) 相关的次数B 列中的唯一值。在下图中,您会注意到 clacc_no 84242 显示了两次,但有两个 order_no 与此相关,因此我希望将其作为计数接收。

另外,我想分别总结一下B列中与这些唯一值相关的order_total_sell(C列)。

谁能指出我正确的方向,因为 Index 和 Match with countif 和 sum 对我不起作用,除非我做错了什么?

非常感谢您的阅读。

【问题讨论】:

标签: google-sheets match google-sheets-formula countif google-sheets-query


【解决方案1】:

尝试:

=QUERY(B2:C, 
 "select B,count(B),sum(C),avg(C) 
  where B is not null 
  group by B 
  label count(B)'No. of Orders',sum(C)'Total Value',avg(C)'Average Value'")

【讨论】:

  • 太棒了,非常感谢您的帮助,我以后一定会使用=Query。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-03-13
  • 2021-12-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-12
相关资源
最近更新 更多