MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question
crosssposted: mrexcel.com/board/threads/find…e-in-text-format.1155155/
Hello everyone,
I’m layperson in VBA coding. Would be grateful for any help.
I have a code as it follows below.
It has list of stock symbols (1 to 6 letters each) in the column K
It loops through each cell in column K and returns value to cell B4
Then it calls macro GetYahooData to download historical price data (of the stock symbol in cell B4) into the range of cells and copies these data.
I want to modify code so that it could finds CSV file in the folder C:\VBA and open it.
The file name corresponds to current stock symbol in Worksheets("Sheet2").Range("B4").Value
So if for example current value of cell B4 is AAPL the file name will be AAPL.csv
It is important that if stock symbol is just A it should not open every file containing A in its name.
The aim is to paste copied historical price data of each stock into corresponding file.
The rest of the code modification I hope I will manage myself.