Forum Discussion

Daniel0's avatar
Daniel0
Copper Contributor
Dec 17, 2018

How to separate my data

I have headers of

"Company Number", "Stock Ticker",  "Date", "Price"

Currently each row is one day, I have 15 years worth of data.

After the 10  years of prices are listed for one stock, the next company's stock immediately follows, and starts again from 2003 each row until 2018

Then this happens for the next stock etc...

I have like 400 stocks.

 

First, I want to remove all data points for any stock ticker that isn't in a certain list of tickers that I have

Then I want to move data for each stock to a separate page in excel, how do I do this easily?

  • JWR1138's avatar
    JWR1138
    Iron Contributor

    This seems pretty doable in VBA, are you sure you want this as 400 separate worksheets in one workbook though? that seems like it would be quite a pain to work with. 

    • Daniel0's avatar
      Daniel0
      Copper Contributor

      I'm not familiar with VBA at all, how could I do that?

      I would like all of those pages so it is easy for me to look at companies individually, because scrolling through 1,000,000 rows is a pain.

      But when I clean all of the data, I would eventually want like the rows be the date, and the columns be the ticker, both headed.

       

      • JWR1138's avatar
        JWR1138
        Iron Contributor

        I'll help you with whichever way you want to do this, I think you'd be better off keeping all the data on one sheet though and just having another sheet where you input the stock symbol and it displayed the data for just that stock, would that work for you?

Resources