+ Reply to Thread
Results 1 to 9 of 9

Thread: Matching data from one sheet to another based on cusips

  1. #1
    Registered User
    Join Date
    04-03-2011
    Location
    Cologne
    MS-Off Ver
    Excel 2007
    Posts
    6

    Matching data from one sheet to another based on cusips

    Hello,

    I have to merge data between sheets and I want to avoid a lot of manual work. So here is my problem:

    In the Excel file, I refer to the first sheet and the 6digit Cusips. The cusips are company identifiers and represent firms that introduced antitakeover provisions, such as classified boards, over the period from 1997 to 2009. Classified Boards is an independent governance variable that I use in my analysis. Most of the cusips appear several times for one firm, because they refer to the different years from 1997 to 2009.

    In the second, I have other control variables. They measure size, leverage, risk. In the third sheet I have the dependent variable profitabiity measured by e.g. Operating profit margin. The 6digit cusips (Cusip6) are mentioned as well. As not all firms introduced antitakeover provisions, the first sheet does not have all cusips of Sheet 2 and 3.

    I want to merge the data from sheet 2 and 3 according to the Cusisp of the first sheet. Then I want to import the data into Stata to do the regression.

    Does somebody now a function how to do that in Excel? (I attached a small part of the file due to a size limit for attachments)

    Thanks...
    Attached Files Attached Files

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Matching data from one sheet to another based on cusips

    To match against each list:

    =INDEX('risk,size,lev - profit.**** (2)'!B:B,MATCH('G index 97-06 '!A2,'risk,size,lev - profit.**** (2)'!D:D,1))

    =INDEX(profitab.measures!B:B,MATCH('G index 97-06 '!A2,profitab.measures!C:C,1))


    Regards

  3. #3
    Registered User
    Join Date
    04-03-2011
    Location
    Cologne
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Matching data from one sheet to another based on cusips

    hey thx for the help so far, however, it is still not working...probably because I am not very experienced with Excel

    ....instead of B:B, the index formula in Excel tells me to type in row number and column number, so 2,2 in my case, but excel does not calculate it

    and what do you mean with D:D, 1?

    regards

  4. #4
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Matching data from one sheet to another based on cusips

    Apologies, the formula was "adjusted" in the post, as it were. I'll have a look later and upload your sample workbook.

    Regards

  5. #5
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Matching data from one sheet to another based on cusips

    Oh, I understand now ... the abbreviation for "analysis" has been asterisked out because it looks like a "naughty" word ... "a*n*a*l"

    See the attachment.


    Regards
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-03-2011
    Location
    Cologne
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Matching data from one sheet to another based on cusips

    hey thx a lot, it works now..
    however the next problem is already waiting for me I guess^^

  7. #7
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Matching data from one sheet to another based on cusips

    You're welcome.

  8. #8
    Registered User
    Join Date
    04-03-2011
    Location
    Cologne
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Matching data from one sheet to another based on cusips

    Hello,

    in the file attachted the data are collected for governance variables (e.g. Classified Board) every two years, the even years. For instance, I need the data from 1998 to be copied to the year 1999 and this for all firms/Cusips. Thus, I need the same entries from of the year 1998 in year 1999. I only need to change the year to "1999", the rest of the data from 1998 should stay the same.
    I have to do that for many firms. Is there a function how to do that?

    In addition to that, I also need to copy the data for Beta, Total Assets and Total LTDebt from the 2nd and 3rd sheet which is typed in horizontally, to be copied to the 1st sheet.
    However, in the first sheet the data have to be vertically, according to the years on the left side in sheet 1.

    Is there another function to do that? Or maybe it works like the Index and Matching formula indicated already above...I will try that as well!

  9. #9
    Registered User
    Join Date
    04-03-2011
    Location
    Cologne
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Matching data from one sheet to another based on cusips

    see the file attached here
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0