View Single Post
  #4   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

AriBari,

I fear this is a bit more of a "How do I build a car engine" than "how do I
start it" question. Well, perhaps I exaggerate a bit, but there isn't a
quick answer. There isn't anything in Excel that does this automatically,
and a macro won't exactly be a three-liner.

A macro will have to determine the first file name, open the file, start
reading it, looking for whatever it is that will identify the start of the
rows you want. Then it must continue reading, putting the stuff into a
sheet, keeping track of rows and columns, and, presumably, counting the
records until it has reached the end of the section. Then it must close the
file, determine the next file name, open the next file, and do all this
again, putting the data in the sheet, or another sheet, or whatever is
needed. Repeat, watching for the end of the files, or file names.
--
Earl Kiosterud
www.smokeylake.com/
-------------------------------------------

"AriBari" wrote in
message ...

Hello Earl,

Thanks for the recommendation, beacuse it brings up a point that I
should calrify regarding my posting.

The problem with your suggestion is that the text file is not a
database. There are no field names or specific structure that is common
to all rows. However there are sections within the textfile. The line
that starts the section I want is only found in one place - so I can
search for that line and say copy from that line the next 1005 lines
into the Excel sheet.

Hope this helps.

Thanks,
Ari Bari


--
AriBari
------------------------------------------------------------------------
AriBari's Profile:
http://www.excelforum.com/member.php...o&userid=25043
View this thread: http://www.excelforum.com/showthread...hreadid=385663