计算列

时间:2016-09-04 20:33:07

标签: excel

我有一个excel表,其中包含有关包含ProductOwner等列的错误的信息。

Product列包含值{字符串},例如PTSSDE等。

如何查找每种产品(PTS或SDE)的发生次数?

例如,下表 -

    ╔════╦══════════════╦═════════╗
    ║ id ║  Product     ║    Owner║
    ╠════╬══════════════╬═════════╣
    ║  1 ║    PTS       ║    thiru║
    ║  2 ║    PTS       ║  sajeesh║
    ║  3 ║    SDE       ║    varun║
    ║  4 ║    SPB       ║  ranjith║
    ╚════╩══════════════╩═════════╝

查询Product列时会返回

PTS - 2
SDE - 1
SPB - 1

2 个答案:

答案 0 :(得分:3)

最简单的解决方案是数据透视表,Power Query,PowerPivot等。 与公式解决方案不同,它们不会在更改源范围时自动更新,但您可以配置刷新频率或手动刷新它们的频率。

答案 1 :(得分:1)

Product           Formula                            Result
PTS               =countif(Product_Range, "PTS")     2 
SDE               =countif(Product_Range, "SDE")     1
SPB               =countif(Product_Range, "SPB")     1

countif公式正在查看包含产品名称的数据范围,并计算与您在公式中指定的名称相匹配的项目数。

以下是countif采取的论据

=countif(range, criteria)