Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default string.matchPattern ???

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default string.matchPattern ???

Thanks for the hint. It worked!

Greetings
;-)

Tom Ogilvy schrieb:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) Brian Excel Programming 3 February 9th 06 03:38 PM
Importing Long String - String Manipulation (EDI EANCOM 96a) Brian Excel Programming 6 February 9th 06 12:27 PM
to search for a string and affect data if it finds the string? Shwaman Excel Worksheet Functions 1 January 11th 06 12:56 AM
Create a formula into a String then assign string to a cell Myrna Larson[_2_] Excel Programming 6 August 23rd 03 09:42 PM


All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"