使用公式有效地计算单元格和列

Counting cells and columns efficiently with a formula

我需要在 table 中填写某个邮政服务的使用次数以及所在地区。

我有一个大文件:https://docs.google.com/spreadsheets/d/1xNiE6hoLRyfuMOnUHTM0RjzeXCfCwvxn7ISAD3t4moA/edit?usp=sharing

我在电子表格中创建了另一个名为数据的选项卡,如何计算服务的使用次数并将其关联到正确的区域?

我将如何动态执行此操作?因为我不一定事先知道服务或地区。

在新标签页中,在 A1 中尝试

=query('2016-pf'!A:B, "Select B, count(B) where B <>'' group by B pivot A", 1)

看看是否适合你?

=ARRAYFORMULA(PROPER(QUERY('2016-pf'!A2:B, 
 "select B,count(B) 
  where B is not null 
  group by B 
  pivot A", 0)))