Thread: break at space
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Learner[_4_] Learner[_4_] is offline
external usenet poster
 
Posts: 6
Default break at space

Thank you Howard and Rick, Rick's code produces exactly what I was looking
for.


"Rick Rothstein" wrote in message
...
I think this macro does what I think you are saying you want to do (just
change the Worksheet name and Range reference for the cell containing the
words in the With statement to match your actual set up)...

Sub SplitDownAtSpace()
Dim Words() As String
With Worksheets("Sheet4").Range("A1")
Words = Split(.Value)
.Resize(UBound(Words) + 1).Value = WorksheetFunction.Transpose(Words)
End With
End Sub

--
Rick (MVP - Excel)


"Learner" wrote in message
...
Hello, I have thousands of nouns separated by a space (abandonments
abbreviating abbreviation abbreviators ...) and I would like to put a
formula so that at each space the remaining is copied to the next cell
(killing the needless space).

Can it be done, can you hint me to how to do this?

thank you