Hi,
I am looking for a vba code that will open a specific text file and look for specific data. Then I want it to place that data in specified column in excel worksheet based on criteria of another column in same worksheet.
See below example from text file:
Data Report for John Smith
January 31, 2018
Report By: Portfolio
Adjusted Market Underlying
Total Market Value: 23,734 2,140
04/19/18 05:18:10 AM Page 1 of 1
Using above text example, I need code that will look for the line that begins with "Total Market Value", then return the number after the SECOND space, which is 2,140.
Then I want the code to place the number it found in column C of the excel sheet IF column A contains "John Smith".
So if John Smith was found in A11, then the 2,140 would be placed in C11.
Then I want the code to close and delete the text file.
I am looking for a vba code that will open a specific text file and look for specific data. Then I want it to place that data in specified column in excel worksheet based on criteria of another column in same worksheet.
See below example from text file:
Data Report for John Smith
January 31, 2018
Report By: Portfolio
Adjusted Market Underlying
Total Market Value: 23,734 2,140
04/19/18 05:18:10 AM Page 1 of 1
Using above text example, I need code that will look for the line that begins with "Total Market Value", then return the number after the SECOND space, which is 2,140.
Then I want the code to place the number it found in column C of the excel sheet IF column A contains "John Smith".
So if John Smith was found in A11, then the 2,140 would be placed in C11.
Then I want the code to close and delete the text file.