Hello dear friends,
I'm looking for a macro to find and replace values in a txt file.
The txt file is located in the route D:\Template\info.txt
This file looks like this
and the Excel file looks like this
What I need is a macro that can find and replace the following:
Find %time% and replace with the value of cell G2
Find %GPU1T% and replace with the value of cell A2
Find %GPU1F% and replace with the value of cell C2
Find %GPU1R% and replace with the value of cell E2
Find %GPU2T% and replace with the value of cell B2
Find %GPU2F% and replace with the value of cell D2
Find %GPU2R% and replace with the value of cell F2
After that, of course save the file but in a NEW location which is D:\GPUReport
but with the same name info.txt
I hope someone can help me with this.
Thank you so much in advance!
I'm looking for a macro to find and replace values in a txt file.
The txt file is located in the route D:\Template\info.txt
This file looks like this
The current date and time is: %time%
GPU1 Temperature is: %GPU1T%
GPU1 Fan Speed is: %GPU1F%
GPU1 RPM are: %GPU1R%
GPU2 Temperature is: %GPU2T%
GPU2 Fan Speed is: %GPU2F%
GPU2 RPM are: %GPU2R%
and the Excel file looks like this
What I need is a macro that can find and replace the following:
Find %time% and replace with the value of cell G2
Find %GPU1T% and replace with the value of cell A2
Find %GPU1F% and replace with the value of cell C2
Find %GPU1R% and replace with the value of cell E2
Find %GPU2T% and replace with the value of cell B2
Find %GPU2F% and replace with the value of cell D2
Find %GPU2R% and replace with the value of cell F2
After that, of course save the file but in a NEW location which is D:\GPUReport
but with the same name info.txt
I hope someone can help me with this.
Thank you so much in advance!