View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Strip records from large textfile with VBA

Hi Mark,

I normally associate a text file such as you describe here as being a 'data
dump'. Reason is that I can't imagine using a text file for storing large
amounts of data when a database has so much more to offer. However, if your
text file includes the field names in the first row then you could use ADO
and query it same as a database table, where the filename is the table name.
You could only return those records you want by specifying criteria in your
SQL statement. This way it only returns only the records you want, which is
better than searching every record to see if it contains what you want.

Be aware that Excel2003 only has 65,536 rows per sheet so you'll have to
start a new sheet [or column] if all 250,000 records are returned. Excel2007
will handle it without parsing to another sheet [or column].

HTH
Kind regards,
Garry