seeking a formula to count occurrences of a character

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

Hello,

Can anyone tell me if I can create a formula to count the
number of commas in a character string? For example, if a
cell contains the string "10,2,9,5" then I would like to
formula to return 3 which is the number of commas in the
string.

Thanks
Ron
 
=len(A1)-len(substitute(A1,",",""))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top