+ Reply to Thread
Results 1 to 4 of 4

Match and merge two data sets by dates- for each permno

  1. #1
    Registered User
    Join Date
    08-11-2016
    Location
    china
    MS-Off Ver
    2013
    Posts
    17

    Match and merge two data sets by dates- for each permno

    Hello Friends, I have a large set of main data consisting of permo(company identifier), date(Jan 2000 to Dec 2013) and returns in excel file sheet1. I also have another set of data in sheet2 (consists of date,MKT-RF,SMB,HML) which I need to merge or join to the main data . The issue is that the main data date is not balanced, by this I mean the dates are not consistent for each permno(sheet1 Column A). Please I need help on how to repeatedly copy and paste the second data consisting of date, MKT-RF, SMB and HML to the main data ensuring the dates match.

    Please see attached excel document to understand what I mean. I know my explanation above might not be clear enough. Thanks for your help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Match and merge two data sets by dates- for each permno

    If I am understanding you correctly, you can use the following formula in E2:

    =INDEX('data to merge'!B$2:B$3522,MATCH($B2,'data to merge'!$A$2:$A$3522,0))

    Fill it right into F2 and G2, then fill down through the end of your data. Take a look at the attachment to see if I've got it right:
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-11-2016
    Location
    china
    MS-Off Ver
    2013
    Posts
    17

    Re: Match and merge two data sets by dates- for each permno

    Wow CAntosh, you really understood exactly what I wanted. Thank you so much, it worked perfectly well as I wanted.

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Match and merge two data sets by dates- for each permno

    Happy to help, good luck!

+ 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. How To Compare Two Sets Of Similar Data Sets To Find a Good Match
    By Mark123456789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2016, 01:29 AM
  2. How to merge 2 sets of data
    By london7871 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-01-2016, 10:01 AM
  3. Replies: 4
    Last Post: 07-20-2015, 06:44 AM
  4. Combine two data sets and merge them
    By oddy73 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-23-2015, 07:15 AM
  5. 3 Sets of Data (tabs). How to merge & curate?
    By JPWRana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2014, 05:47 AM
  6. [SOLVED] Merge two data sets A & B into one
    By plumberef in forum Excel General
    Replies: 4
    Last Post: 10-25-2012, 11:04 PM
  7. merge two data sets one unique
    By CESTOTT in forum Excel General
    Replies: 2
    Last Post: 01-25-2006, 11:50 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