Hi folks
I want to do the following using VBA:
- find some numbers in a textfile and replace these numbers.
- I know the number of characters that shall be entered/ stored / placed into the text file
- but the numbers that shall be replaced can be of variable numbers of characters
The numbers that shall be replaced are in the same line as the line starting with the words "simulation results"
After this expression there are 4 numbers separated by a space. All these 4 numbers shall be replaced with other numbers.
For example
The line in text file: "simulation results 0.020 923 9832.2 93.22 BDV XYXS" should be replaced with
"simulation results 0.0666 2222 2 0 BDV XYXS"
since numbers of characters may vary it can also look like:
"simulation results 1 2132323.2 111.1111 11 BDV XYXS" should be replaced with
"simulation results 0.0666 2222 2 0.213 BDV XYXS"
I have several hundreds of these textfiles and want to change these using VBA - to give me more flexibility in my work.
I struggle to find out these issues.
Hope someone can guide me.
Thanks!
Bookmarks