Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I isolate the last two words in a text string? | Excel Discussion (Misc queries) | |||
return first TWO or THREE words in string | Excel Discussion (Misc queries) | |||
break the cell by words | Excel Discussion (Misc queries) | |||
Excel pie chart title words break to next line between letters? | Charts and Charting in Excel | |||
How do I break up a concatenated text string ? | Excel Discussion (Misc queries) |