View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default Split sentences into words

You can just about do it with worksheet functions, but it's rather
long-winded (and dependent on correct input)

With the sentence in A1
A2: =LEFT(A1,FIND(" ",A1)-1)
A3: =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)
A4: "and so on"...

It's a bit easier if you have some helper cells that just contain the
positions of the spaces:

A2: =FIND(" ",$A$1)
A3: =FIND(" ",$A$1&" ",A2+1) ' append space to avoid special case for
last word
and copy the A3 down a few rows
B2: =LEFT($A$1,A2-1)
B3 =MID($A$1,A2+1,A3-A2-1)
and copy B3 down.

HTH
Andrew


sparx wrote:
Does anybody know of a formula that can look at a sentence of say 3 or 4
words and then look for the spaces inbetween the words and put each word
in a different cell underneath each other?


--
sparx
------------------------------------------------------------------------
sparx's Profile: http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=515292