I have scoured the interwebs looking for a VBA solution to the problem below to no avail. My text files range in the 3-5 million lines (this varies from text file to text file) of data but I only need to extract the last 12 lines of actual data and put into an Excel sheet, preferably delimited by spaces and tabs. Obviously, I cannot load the text file straight into Excel with a million or so row limit and using DataTypes.Add does not favor any better.
Is there a way to import these last few lines of data to Excel in a delimited fashion? My data looks something like this
From text file:
Blah blah blah stuff I don't need for 5 million lines
Line5550203:
Line5550204: This is the title of this section of data
Line5550205:
Line5550206: Title of data 1 Title of Data 2 Title of data 3
Line5550207:
Line5550208: Units of data 1 Units of Data 2 Units of data 3
Line5550209:
Line5550210: Data1 Data2 Data 3
Line5550211:
Line5550212: Title of next section of data
Line5550213:
Line5550214: Title of Data 1a Title of Data 2a Title of Data 3a
Line5550215:
Line5550216: Units of Data 1a Units of Data 2a Units of Data 3a
Line5550217:
Line5550218: Data 1a Data 2a Data 3a
End of file
Obviously, I don't want to import the empty lines, just the data. The titles would be optional and I don't need the units. Any help or pointing me in the right direction would be appreciated. Thank you in advance!