View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
bj bj is offline
external usenet poster
 
Posts: 1,397
Default How to Count String occurences

If you are sure there are no space multiples greater than 2 you can use
=(len(a1)-len(substitute(a1," ",""))/2

"Chaplain Doug" wrote:

Excel 2003. Is there a quick way (a function perhaps) to count the number of
occurences of a substring within a string? I have address strings in which I
want to quickly count the number of occurences of a double space (" ") in
the string. Thanks for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org