Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Break string into words

Hey guys,
I'm looking to extract some info from textboxes on a
userform. The info could be 1-4 words. Is there a way I
can break a string of 4 words into 4 separate strings? I
know with Excel functions I could use Search to find the
spaces and then try to go from there, but is there a
better way?

Thanks,
TT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Break string into words

The VB "split" function will return a one dimensional array of substrings
and the default delimter is the space character. You can then check the
size of the array and deal with the substrings however you wish.

Steve


"Tommy T" wrote in message
...
Hey guys,
I'm looking to extract some info from textboxes on a
userform. The info could be 1-4 words. Is there a way I
can break a string of 4 words into 4 separate strings? I
know with Excel functions I could use Search to find the
spaces and then try to go from there, but is there a
better way?

Thanks,
TT



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Break string into words

Thanks, that's exactly what I was looking for.
-----Original Message-----
The VB "split" function will return a one dimensional

array of substrings
and the default delimter is the space character. You

can then check the
size of the array and deal with the substrings however

you wish.

Steve


"Tommy T" wrote in

message
...
Hey guys,
I'm looking to extract some info from textboxes on a
userform. The info could be 1-4 words. Is there a

way I
can break a string of 4 words into 4 separate

strings? I
know with Excel functions I could use Search to find

the
spaces and then try to go from there, but is there a
better way?

Thanks,
TT



.

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
How can I isolate the last two words in a text string? Steve Gibbs Excel Discussion (Misc queries) 7 November 28th 08 11:23 PM
return first TWO or THREE words in string EngelseBoer Excel Discussion (Misc queries) 10 September 7th 08 04:51 PM
break the cell by words Shaffiqe Excel Discussion (Misc queries) 1 August 29th 08 08:07 AM
Excel pie chart title words break to next line between letters? sweetsweed Charts and Charting in Excel 0 October 9th 06 07:10 PM
How do I break up a concatenated text string ? Bhobhojani Gudo Excel Discussion (Misc queries) 2 March 3rd 06 07:57 AM


All times are GMT +1. The time now is 01:33 PM.

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

About Us

"It's about Microsoft Excel"