• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Data formatting to proper form, selected variables from rows to columns automatically

Jacob Petersen

New Member
Dear experts.

I have a data extract from Reuters Datastream which I need to import into Stata (Statistical software program).
However, the data format is not properly formatted, and I hope you can help me.

Please see the file attached.
'Raw data' shows the data extract from Datastream and 'Proper format example' shows an example of the proper format.

Since I will have to convert a large amount of data, it would have to be automatic in some way through formulas/VBA/pivot tables, or whatever makes most sense.

Thank you in advance, and I hope to hear from you.

Best regards,
Jacob
 

Attachments

See attached. I ran a pivot off your data and then put formulas against the pivot. Not the most elegant solution but should get the job done. Just drag the rows of formulas down depending on how large your dataset is.
 

Attachments

Shteven, you are a creative thinker and a genius. You just saved me so much time. The method is perfect and easy.
Thank you so much!!!!
 
You can also use Power Query to achieve the same result. Depending on how you source your original data, this could become a one-step process, if I'm correctly diving your problem ...
 
Back
Top