Posts by dilshod_k

    Hello alansidman and royUK,

    My apologies for breaching forum rules. Rules have been read and understood. I did not expect that and are related websites. Sometimes posts remain without response for a long enough time, sometimes some solutions are better than other ones. I thought there would not be harm to post request for help somewhere else. My understanding, as a result of warning from moderators of both websites, none of my posts have been attended so far. Kind regards.




    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.