将 Excel 公式合并到 COUNTIF 所有选项卡
Consolidate Excel formula to COUNTIF all tabs
我目前正在使用 COUNTIF
公式计算多个工作表中的单词 "Competitor"。对于一系列工作表,是否有一种好方法可以将此公式合并为 运行 COUNTIF
?
=COUNTIF('Outside 12.2'!P2:P4977,"Competitor")+COUNTIF('Outside 12.7'!P2:P4977,"Competitor")+COUNTIF('Outside 12.8'!P2:P4977,"Competitor")+COUNTIF('Outside 12.12'!P2:P4977,"Competitor")+COUNTIF('Outside 12.19'!P2:P4977,"Competitor")+COUNTIF('Big East 11.30'!P2:P4977,"Competitor")+COUNTIF('Northern Tier 11.25'!P2:P200,"Competitor")+COUNTIF('Northern Tier 11.23'!P2:P56,"Competitor")+COUNTIF('Northern Tier 1'!P2:P1000,"Competitor")
在您进行计算的 sheet 上,像这样设置 table:
在单元格 E2 中是这个公式:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&A2:A10&"'!"&B2:B10),E1))
我目前正在使用 COUNTIF
公式计算多个工作表中的单词 "Competitor"。对于一系列工作表,是否有一种好方法可以将此公式合并为 运行 COUNTIF
?
=COUNTIF('Outside 12.2'!P2:P4977,"Competitor")+COUNTIF('Outside 12.7'!P2:P4977,"Competitor")+COUNTIF('Outside 12.8'!P2:P4977,"Competitor")+COUNTIF('Outside 12.12'!P2:P4977,"Competitor")+COUNTIF('Outside 12.19'!P2:P4977,"Competitor")+COUNTIF('Big East 11.30'!P2:P4977,"Competitor")+COUNTIF('Northern Tier 11.25'!P2:P200,"Competitor")+COUNTIF('Northern Tier 11.23'!P2:P56,"Competitor")+COUNTIF('Northern Tier 1'!P2:P1000,"Competitor")
在您进行计算的 sheet 上,像这样设置 table:
在单元格 E2 中是这个公式:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&A2:A10&"'!"&B2:B10),E1))