Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Test-To-Columns 256

Excel XP & Win XP
With VBA, I need to break down large cell entries (more than 256 words)
into individual words. Text-To-Columns works only for 256 words because of
the 256 column limit in Excel XP. Is there a work-around to place the words
into a column rather than a row? Thanks for your time. Otto
PS: My objective is to have VBA work with each individual word. Is there
another way for VBA to capture each individual word?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Test-To-Columns 256

Patrick, Jim
Thanks for that. I think that will do what I want. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
With VBA, I need to break down large cell entries (more than 256 words)
into individual words. Text-To-Columns works only for 256 words because
of the 256 column limit in Excel XP. Is there a work-around to place the
words into a column rather than a row? Thanks for your time. Otto
PS: My objective is to have VBA work with each individual word. Is there
another way for VBA to capture each individual word?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Test-To-Columns 256

Just to add to Jim's idea:

Sub test()
Dim str As String
Dim ary() As String
Dim lng As Long

str = "This is a test"
ary = Split(str, " ")
Range("A1").Select

For lng = LBound(ary) To UBound(ary)
ActiveCell = ary(lng)
ActiveCell.Offset(1, 0).Select
Next lng
End Sub

You probably figured it out already...

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Otto Moehrbach" wrote:

Patrick, Jim
Thanks for that. I think that will do what I want. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
With VBA, I need to break down large cell entries (more than 256 words)
into individual words. Text-To-Columns works only for 256 words because
of the 256 column limit in Excel XP. Is there a work-around to place the
words into a column rather than a row? Thanks for your time. Otto
PS: My objective is to have VBA work with each individual word. Is there
another way for VBA to capture each individual word?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Test-To-Columns 256

How about a somewhat short macro that doesn't involve any looping?

Sub SplitTextIntoWordsAndListDownTheColumn()
Dim Txt As String
Txt = "This is a test"
Range("A1:A" & (1 + Len(Txt) - Len(Replace(Txt, " ", "")))) = _
WorksheetFunction.Transpose(Split(Txt, " "))
End Sub

--
Rick (MVP - Excel)


"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
With VBA, I need to break down large cell entries (more than 256 words)
into individual words. Text-To-Columns works only for 256 words because
of the 256 column limit in Excel XP. Is there a work-around to place the
words into a column rather than a row? Thanks for your time. Otto
PS: My objective is to have VBA work with each individual word. Is there
another way for VBA to capture each individual word?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Test-To-Columns 256

Sorry, I tend to think in "one liners", but I'm guessing the macro I posted
might be a tad hard to decipher. Here it is rewritten slightly and it should
be easier to follow...

Sub SplitTextIntoWordsAndListDownTheColumn()
Dim Txt As String
Dim Ary() As String
Txt = "This is a test"
Ary = Split(Txt)
Range("A1").Resize(1 + UBound(Ary)) = WorksheetFunction.Transpose(Ary)
End Sub

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
How about a somewhat short macro that doesn't involve any looping?

Sub SplitTextIntoWordsAndListDownTheColumn()
Dim Txt As String
Txt = "This is a test"
Range("A1:A" & (1 + Len(Txt) - Len(Replace(Txt, " ", "")))) = _
WorksheetFunction.Transpose(Split(Txt, " "))
End Sub

--
Rick (MVP - Excel)


"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
With VBA, I need to break down large cell entries (more than 256
words) into individual words. Text-To-Columns works only for 256 words
because of the 256 column limit in Excel XP. Is there a work-around to
place the words into a column rather than a row? Thanks for your time.
Otto
PS: My objective is to have VBA work with each individual word. Is
there another way for VBA to capture each individual word?



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
Test-To-Columns 256 Jim Thomlinson Excel Programming 0 June 18th 09 06:07 PM
Test-To-Columns 256 Patrick Molloy Excel Programming 0 June 18th 09 06:07 PM
TEST for items in 2 columns to MATCH? nastech Excel Discussion (Misc queries) 4 September 22nd 07 05:29 AM
Trying to test several columns for changes when entering data Bruce[_2_] Excel Programming 1 May 23rd 07 06:04 PM
Sum one column after capmaring test from teo more columns Ashfaq Excel Worksheet Functions 1 January 5th 05 02:45 PM


All times are GMT +1. The time now is 11:55 AM.

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"