统计单元格中A或B或C的数量A1单元格AABC,A2单元格BBC,用公式计算A的数量,B的数量,C的数量

1个回答

  • 统计A1至A10单元格中"A"字符的个数,则公式为

    =SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,"A",)))

    统计A1至A10单元格中"B"字符的个数,则公式为

    =SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,"B",)))

    统计A1至A10单元格中"C"字符的个数,则公式为

    =SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,"C",)))

    如果是统计A1至A10单元格中"A,"B","C"三个字符的总个数,则公式为

    =SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,{"A","B","C"},)))