+ Reply to Thread
Results 1 to 6 of 6

Copy data in one format from Sheet1 and paste to another sheet in another format.

  1. #1
    Registered User
    Join Date
    06-03-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy data in one format from Sheet1 and paste to another sheet in another format.

    Hi Everyone,

    I just found this forum today and it seems to be exactly what I was looking for. I am having a problem with reformatting the data I have pulled from a bloomberg terminal.

    Problem 1) The date in columnA for every company listed comes up with an error. I would like to replace it with the proper date. Unfortunately, the dates are not all the same (i.e. I cannot "replace all" with the date 31/12/2011) and should be a month earlier than the date in columnB.

    Problem 2) I would like to change the format completely as outlined in the attached workbook. Because the data for every company does not span the period 31/12/2011 - 01/01/2002, some companies have data that start in columnA as a different date such as 01/01/2005, etc. I want to pull this data the sheet "Target Format" so that it is easier to manipulate - if there is no data for a company for a certain date, I want a value of 0 to be returned.


    I have to do this with multiple sheets so ideally a macro would be ideal. All source data sheets have the same format as in the example. I have no idea how I would go about copying the data to thesought format. Any ideas or advice?


    Data Format Change.xlsx

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Copy data in one format from Sheet1 and paste to another sheet in another format.

    Try it. But note the rows 193-194, 352-353, 411-412, 558-559, 905-906 on the 'Current format' tab in your file.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-03-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy data in one format from Sheet1 and paste to another sheet in another format.

    ????? Data Format Change - Further Info.xlsm

    nilem, I am having a small problem using your macro with my other datasets. Your worksheet works perfectly on the dataset from which I posted a sample in the example workfile above. However, I have copied my other data into your worksheet with different datasets (the same format as in the example excel file). There are over 1800 companies in each case. When I use your excel sheet only 1300 companies come out for one of the datasets. With another dataset only 700 companies are outputted.

    I have attached a file with a sample of each dataset that I am using as it is too big to upload the whole thing.
    Last edited by FergusC; 06-04-2012 at 07:29 PM.

  4. #4
    Registered User
    Join Date
    06-03-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy data in one format from Sheet1 and paste to another sheet in another format.

    Anyone have any ideas???

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Copy data in one format from Sheet1 and paste to another sheet in another format.

    Try it. Go to the worksheet with the data and run the macro (press Alt+F8, select 'ertert33', press 'Run').
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-03-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy data in one format from Sheet1 and paste to another sheet in another format.

    Quote Originally Posted by nilem View Post
    Try it. Go to the worksheet with the data and run the macro (press Alt+F8, select 'ertert33', press 'Run').
    nilem, thank you so much. you are a lifesaver!

+ 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.6.0 RC 1