没太明白你的要求。尝试着理解了一下。
在D列建一个合并列,在D2输入公式:=A2&B2&C2。下拉。
插入数据透视表,选择D列数据。把合并列拖拽到左下角的行标签,再次把合并列拖拽到右下角计数。完成。
=SUM(N(MATCH(IF(A1:A7&B1:B7="A当阳",A1:A7&B1:B7&C1:C7,"ABC"),IF(A1:A7&B1:B7="A当阳",A1:A7&B1:B7&C1:C7,"ABC"),)=ROW(1:7)))+SUM(N(MATCH(IF(A1:A7&B1:B7="B枝江",A1:A7&B1:B7&C1:C7,"ABC"),IF(A1:A7&B1:B7="B枝江",A1:A7&B1:B7&C1:C7,"ABC"),)=ROW(1:7)))-2 按组合键ctrl+shift+enter结束公式
=SUMPRODUCT(N(MATCH(A2:A8&B2:B8&C2:C8,A2:A8&B2:B8&C2:C8,)=ROW(1:7)))