Count specific characters in a cell - Excel

后端 未结 4 1584
日久生厌
日久生厌 2021-02-11 03:43

I would like to count all special characters (!%_*?+-,) in a cell.

For example:

With this formula =LEN(D2)-LEN(SUBSTITUTE(D2;\"!\";\"\")) i

4条回答
  •  抹茶落季
    2021-02-11 04:35

    =8*LEN(D2)-LEN(SUBSTITUTE(D2;"!";""))-LEN(SUBSTITUTE(D2;"%";""))-LEN(SUBSTITUTE(D2;"_";""))-LEN(SUBSTITUTE(D2;"*";"")) -LEN(SUBSTITUTE(D2;"?";""))-LEN(SUBSTITUTE(D2;"+";""))-LEN(SUBSTITUTE(D2;"-";""))-LEN(SUBSTITUTE(D2;",";""))

提交回复
热议问题