Thread: Count using VB
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Count using VB

Hi
not quite sure but maybe
sub foo()
dim svalue as string
dim counter
svalue = "x,y,z"
counter = len(svalue) - len(replace(svalue,",","")) +1
msgbox counter
end sub

--
Regards
Frank Kabel
Frankfurt, Germany

"vedrah " schrieb im
Newsbeitrag ...
How can I write a macro to count a series of text?
example x,y,z = 3?


---
Message posted from http://www.ExcelForum.com/