Thread: length of word
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
egun egun is offline
external usenet poster
 
Posts: 88
Default length of word

LOL - always so many ways to do the job!
-------------------------
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


"Gary''s Student" wrote:

Sub splitum()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To n
With Cells(i, 1)
s = Split(.Value, " ")
.Value = s(1)
.Offset(0, 1).Value = s(0)
End With
Next
End Sub

--
Gary''s Student - gsnu200835


"egun" wrote:

If your data is in Column A:

in Column B, add the formula =LEFT(A1,FIND(" ",A1)-1)
(this separates out the "Glass" part)

in Column C, add the formula =RIGHT(A1,LEN(A1)-FIND(" ",A1))
(this gets the rest of the text)

Then fill down as many rows as you have data.

This will work no matter what the first word (Glass in this case) is - it
will always separate the first word from the rest of the cell's text.

HTH,

Eric