Thread: Extracting text
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Extracting text

Try this:

A1 = 103 Deer Park CDP 23 476 9,435 334 234

B1 =

=LEFT(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))-4))-1)

C1 =

=SUBSTITUTE(A1,B1&" ","")

You can convert the formula in C1 to a constant by EditCopy then EditPaste
SpecialValues then do Text to ColumnsDelimitedSpace

Biff

"Guy Lydig" wrote in message
...
I am copying a number of columns from a PDF file and pasting in Excel. It
pastes with spaces between words and between columns. The columns look
like
this:
# TEXT (between 2 and 6 words) # # # # # (where each # means there is a
number in that column.)

i.e.
103 Deer Park CDP 23 476 9,435 334 234
103 Harbor on the Hill Village 34 543 12,345 332 555

Converting text to columns is a problem since there are differences in the
number of words. What I would like to know is:

Is there a way to first extract all the text from each line and put it
into
another column and then I can do convert text to columns on the rest of
it.