+ Reply to Thread
Results 1 to 6 of 6

Appending Timeseries data into a panel data set

  1. #1
    Registered User
    Join Date
    09-15-2015
    Location
    Toronto, Canada
    MS-Off Ver
    MS Office 2011
    Posts
    3

    Appending Timeseries data into a panel data set

    Hello,

    I am trying to append the data from multiple data sets.

    What i have is time series data for 1500 companies on 5 different variables. So each sheet is the data for a specific variable like EPS for example. The column headers of each sheet is the company names and the data points are quarterly.
    variable 1 variable 2
    Quarter F1 F2 F3 Quarter F1 F2 F3
    Q1 1.1 1.2 1.3 Q1 1.1 1.2 1.3
    Q2 1.1 1.2 1.3 Q2 1.1 1.2 1.3
    Q3 1.1 1.2 1.3 Q3 1.1 1.2 1.3

    What i need is a panel data where the column headers would be: Company, Date, EPS, variable 2, variable 3 etc.

    Firm Quarter Variable 1 variable 2
    F1 Q1 1.1 1.1
    F1 Q2 1.1 1.1
    F2 Q1 1.2 1.2
    F2 Q2 1.2 1.2
    F3 Q1 1.3 1.3
    F3 Q2 1.3 1.3

    ETC...

    I just need direction or ideas on the most efficient way to append this data.
    please help!!

    Thank You!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Appending Timeseries data into a panel data set

    Hi ihsan,

    Welcome to the Forum!

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-15-2015
    Location
    Toronto, Canada
    MS-Off Ver
    MS Office 2011
    Posts
    3

    Re: Appending Timeseries data into a panel data set

    Hi xladept,

    Thank you for your quick reply.

    Attached you will find a sample of what i am working with.
    Ive used 2 variables and 3 firms.
    But all in all i have 6 variables and 1505 firms.

    Thank You!
    Attached Files Attached Files

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Appending Timeseries data into a panel data set

    Hi ihsan,

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled
    Last edited by xladept; 09-16-2015 at 06:38 PM.

  5. #5
    Registered User
    Join Date
    09-15-2015
    Location
    Toronto, Canada
    MS-Off Ver
    MS Office 2011
    Posts
    3

    Re: Appending Timeseries data into a panel data set

    That worked so beautifully! When i started i thought i could do it on my own but looking at your code now i realize i would never have been able to create that with my deadline. Thank you so much!!!

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Appending Timeseries data into a panel data set

    You're welcome and thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Transpose horizontal data into a vertical data panel
    By Trivmvirate in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2015, 08:46 AM
  2. linked tables and appending data - loss of data
    By Ada01 in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-15-2014, 08:24 AM
  3. I need help with changing my data set to panel data format!
    By Robbin1234 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-14-2013, 08:55 AM
  4. Panel Data Graph
    By Insert Name in forum Excel General
    Replies: 1
    Last Post: 03-22-2013, 12:07 AM
  5. Replies: 4
    Last Post: 01-16-2013, 10:06 PM
  6. Replies: 2
    Last Post: 11-17-2010, 06:59 PM
  7. Changing VBA code to return data range, appending to prior data
    By camcrazy08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2007, 10:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1