【问题标题】:Count If One Name is in Another Column计算一个名称是否在另一列中
【发布时间】:2014-10-21 02:28:04
【问题描述】:

我正在尝试计算名称出现在动态列 (B:B) 中的次数,而动态列 (B:B) 位于包含通配符 (A:A) 的静态列中。动态列可以有 0 个名称,也可以有多个名称,并且一个名称可以出现多次。

EXAMPLE ONE

Static Column (A:A)     Dynamic Column (B:B)        Count (Output)
-------------------     --------------------        --------------
John*                   Fred Smith                  2
Joe*                    Joe MacDonald
Jane Fairfield          Jane Smith
                        Sally Small
                        John MacDonald
                        ...

-

EXAMPLE TWO

Static Column (A:A)     Dynamic Column (B:B)        Count
-------------------     --------------------        -----
John*                   Harry Potter                1
Joe*                    Ron Weasley
Jane Fairfield          Jane Fairfield

-

EXAMPLE THREE

Static Column (A:A)     Dynamic Column (B:B)        Count
-------------------     --------------------        -----
John*                   Hermione Granger            0
Joe*                    
Jane Fairfield          

-

EXAMPLE FOUR

Static Column (A:A)     Dynamic Column (B:B)        Count
-------------------     --------------------        -----
John*                                               0
Joe*                    
Jane Fairfield          

-

EXAMPLE FIVE

Static Column (A:A)     Dynamic Column (B:B)        Count
-------------------     --------------------        -----
John*                   Hermione Granger            3
Joe*                    Ron Weasley 
Jane Fairfield          John MacDonald
                        Joe Sheldon
                        John MacDonald
                        Harry Potter
                        ...

我正在运行旧的 Google 电子表格,因此无法使用 countifs 功能。

我们将不胜感激任何见解。

【问题讨论】:

标签: google-sheets


【解决方案1】:

在这种情况下,应用于数组的COUNTIF 函数应该可以解决问题:

=ArrayFormula(SUM(COUNTIF(B:B,A:A)))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-07
    • 1970-01-01
    • 2019-12-25
    • 1970-01-01
    • 1970-01-01
    • 2013-12-08
    • 2010-12-23
    相关资源
    最近更新 更多