How To Import Text File With No Delimiters?

S

Sam

I have a text file with over 2,000 names that look like the following:

Mr. Benoit Smith
120 Adam Street
Dorchester, MA 02124

Marcus Darbouze
1553 Blue Hill Avenue
Boston, MA 02126

American Public Health Initiatives
10 Fairway Street
Mattapan, MA 02126

Most consist of 3 lines some as many as 5. The text file has no
delimiters so that when I import/open it in Excel it becomes just one
very long column. I need to convert it or parse it into any other
database friendly importable format i.e., .dbf, .xls, .csv etc. What I
need is to convert it into a table with up to five header rows:

head1 head2 head3 head4 head5

Please help, I've been at it for way too many hours.

P.S. Please keep it simple if possible, Excel is all new to me.

TIA
 
D

David McRitchie

Hi Sam,
You did not indicate examples of the 3 to 5 line of data separated by a blank
row as to where they should end up. Nevertheless, you should find
the answer at:

SNAKECOLS, How to snake columns to use fewer pages
http://www.mvps.org/dmcritchie/excel/snakecol.htm
with specific answer in the following macro:

naddr2ss (macro code). Convert 1-up labels to Spreadsheet format.
The 1-Up labels must be separated by at least one blank line to start
a new spreadsheet row.
http://www.mvps.org/dmcritchie/excel/naddr2ss.txt

If you do not get 5 columns of data you can move the cells
around on that row to match you usage before continuing
to process the next destination row.
 

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