ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How To Import Text File With No Delimiters? (https://www.excelbanter.com/excel-discussion-misc-queries/12013-how-import-text-file-no-delimiters.html)

Sam

How To Import Text File With No Delimiters?
 
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

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.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Sam" wrote in message ...
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





All times are GMT +1. The time now is 12:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com