Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro for importing text

Status
Not open for further replies.

dbdataplus

Technical User
Aug 19, 2006
7
US
I have a system that creates a delimited text file that I can import into Excel using the "get external data from text file" option and ... after answering all the question, imports just fine.

The problem is that this text file contains 160 different sections that have to be imported into Excel into 160 different locations, so the job becomes ponderous.

Since I have some control over the input text (as long as it stays text) I could add any kind of "section_1_starts_here" and/or "section_1_ends_here"
markers in the text.

My questions are 1) Can a macro be created to import this data and 2) how complex/intelligent would that Macro have to be?
 






Hi,

First import the entire file, as long as the row count does not exceed 65,536.

Then do the selection process. Since this will be a VBA code (macro) solution, please post in Forum707 AND, please explain how each of these 160 sections are different in structure or use.

Skip,
[sub]
[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top