View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default string.matchPattern ???

if all the blanks will be on the left side this will give you the count
=len(A1)-len(substitute,A1," "))

If only two or 8 and it has to be one or the other

=if(mid(a1,3,1)=" ",8,2)

or tell us more

--
Regards,
Tom Ogilvy



"drofluga" wrote:

Hi there,

i tried to find a function where i can check if there are two or eight
blanks in front of a string. How is this possible?

Best regards,
drofluga