I have a text file that I’d like to extract information from. The text file is organized in a certain way but is not built in such a way where I can import the text into Excel using one of its delimiters. The text is sturctured in the following way:
…..some text….
Sumbodel Name: CORE1
…..some text….
T 1= ##.### T 2= ##.### T 3= ##.### T 4= …
…..some text….
Sumbodel Name: CORE2
…..some text….
T 1= ##.### T 2= ##.### T 3= ##.### T 4= …
…..some text….
**
** Format repeated till the end of file
I’ve attached a copy of this file.
Is there a way to create a VBA to read each line from the text file and search for two occurances:
1) Search for the string “CORE1”
2) Copy this string to cell A2
3) Search for the string “T 2=”
4) Copy the “##.###” value next to it to cell B2
5) Repeat steps 1 to 4 till the end of file
I have hundreds of such files, each with over 100,000 lines. That’s why a extracting data from such files would be more efficient than importing each file directly to Excel and munipulating the data there.
Any help would be great.