如果其他列的值等于特定文本,则计算频率

Count frequencies if values of other column are equal to specific text

City            Job
London          Webdesigner
London          Webdesigner
Tokio           Lawyer
Tokio           Teacher
Buenos Aires    Manager
London          Athlet
Rome            Doctor
London          Webdesigner

我正在寻找一种方法来计算 Webdesigner 的频率,如果 "City" 等于 London(在同一行)。公式的结果应该是3.

假设 City 在 A1 中请尝试:

=COUNTIFS(A:A,"London",B:B,"Webdesigner")

备选方案:

=SUMPRODUCT(--(A1:A10="London")*(B1:B10="webdesigner"))