Text importing problem. Please Help!

W

websrfr

I have a text file that has information in rows. For Example

FieldA XXXX
FieldB XXXX
FieldC XXXX
FieldD XXXX

FieldA XXXX
FieldB XXXX
FieldC XXXX
FieldD XXXX

FieldA XXXX
FieldB XXXX
FieldC XXXX
FieldD XXXX

So I import the text file and I get exactly that. Every line on a ne
row. What I woul like to do is get something more like this:

FieldA FieldB FieldC FieldD
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX

There has to be a way to do this, but I am racking my brain!!!! Help
Any suggestions?

Thank you,
Mar
 
B

buczacz

The need you describe is not unusual.

A 6 step process is required.

(1) import the file into a word processor, perhaps MS-Word.

(2) Do a global substitution for the repeating end of record command, by
substituting a very unique character string, [perhaps !@#$%^&*()] for
the repeating end of record command [^p^p in MS word]. This step makes
sure the double end of record commands are not buried by step 3.

(3) Do a global substitution for the single end of record command,
substituting a tab. In MS Word find ^p and replace with ^t .

(4) Do a global substitution for the unique character string, [perhaps
!@#$%^&*()] substituting one end of record command [ ^p in MS Word]

(5) Save the file as a simple unformatted text file.

(6) Import file into Excel, and use Data / text to column to parse the
data based on a tab delimited records.

Buczacz - - - - - - - - - - - - - -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top