Forum Discussion

te7037's avatar
te7037
Copper Contributor
Nov 15, 2022
Solved

How to count symbols in a cell in MS Excel

I have a cell reference which contains six codes: B_NEW_2; B_NEW_3; B_NEW_4; B_NEW_5; B_NEW_6; B_NEW_7 in MS Excel.

I wish to calculate the number of semi colons in the cell.  

Please advise.

  • a common technique for this is:
    =LEN(A1)-LEN(SUBSTITUTE(A1,";",""))
  • mtarler's avatar
    mtarler
    Silver Contributor
    a common technique for this is:
    =LEN(A1)-LEN(SUBSTITUTE(A1,";",""))
    • te7037's avatar
      te7037
      Copper Contributor

      mtarler 
      Thank you for your response.  But, I wish to count the number of semi-colons in the cell reference ie. there are five semi-colons in the cell reference.

      How do we do that?

Resources