View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default Count tokens in a string

My strings variables usually contain between 2 to 5
string tokens. Here are some examples:

myVar = "Todd Jones" ' 2 tokens
myVar = "Mary Jo Lynn Jackson" ' 4 tokens
myVar = "Peter James Smith Jr." ' 4 tokens

What is a good way to get the COUNT of the number
of tokens in my string?

Thanks