Forum Discussion

CHKRAZE's avatar
CHKRAZE
Copper Contributor
Aug 24, 2021
Solved

STOCK HISTORY HELP

I love the stock history spreadsheet. It is amazing for stock analysis at the beginning and end of each day. My question, to all of you smart folks out there is, is it possible to automate the process and save the desired result to another sheet. For instance, on my stock history sheet, cell C2 is where you type the stock ticker symbol. Then all the cells containing the math and parameters light up like Christmas trees. Certain stocks light up certain cells green and in turn, I make money that day based off of those values. What I am looking for is automation or a bot that enters the tickers (all stock tickers-there are over 5000 of them) in cell C2, runs the math, and then only saves the tickers that have green lights in the specific cell F5 when it gets the desired value. So, if a ticker is typed in C2 and that stock meets the parameters of all my math and cell F5 turns green, then I would like this "bot" or automation to save that (and each) ticker to another sheet. I just don't have the time to type and run over 5000 stock tickers every day. I obviously am in over my head and probably need a lot of help but you have to admit, it is a good idea. I just want to know if this can be done? Can anybody point me in the right direction? My daughter's college tuition depends on it. Thanks everybody!!!
  • VBA will definitely be the right move in this case then. If you look up a "for loop", you could have a list of tickers, and have VBA run through that list, checking for each ticker if your criteria is met and if yes > save a copy to another location.

    Can't get into more specific details without seeing the workbook structure.

    Hope this helps!

5 Replies

  • NVeerappan's avatar
    NVeerappan
    Occasional Reader

    I switched from MS 365 Family to MS 365 personnel and the subscription expired yesterday. The switch was done immediately and as per MS Team the subscription is active though the next charge will be after sometime. All of a sudden from today the stock history is not working and it is showing sever error, the screen shot are attached above. Could anyone please suggest a solution.

  • DKoontz's avatar
    DKoontz
    Iron Contributor
    I want to know more about this investment strategy haha. But couldn't you just run STOCKHISTORY off a list of tickers? One cell for one ticker doesn't sound too efficient. Depends on how your spreadsheet is set up.
    • CHKRAZE's avatar
      CHKRAZE
      Copper Contributor
      I would love to do that but the way my sheet is set up I use 6 months of previous history to find those green lights. So a sheet contains 5000 tickers, each with 6 months of data, would be MASSIVE.
      • DKoontz's avatar
        DKoontz
        Iron Contributor
        VBA will definitely be the right move in this case then. If you look up a "for loop", you could have a list of tickers, and have VBA run through that list, checking for each ticker if your criteria is met and if yes > save a copy to another location.

        Can't get into more specific details without seeing the workbook structure.

        Hope this helps!

Resources