+ Reply to Thread
Results 1 to 4 of 4

Merge worksheets

  1. #1
    Registered User
    Join Date
    01-30-2012
    Location
    D.C.
    MS-Off Ver
    Excel 2007
    Posts
    4

    Talking Merge worksheets

    Hi everyone. I have been trying to work out a macro to merge several hundred worksheets into one, but all I have accomplished is transposition of some of the information in rows instead of columns, needless to say I am very new at this.

    I have attached two files. One is called "Combined within Target Prices DS" and the other one is called "Merged worksheets". The information in the Target prices DS files is of daily stock prices of companies and each worksheet represents one company. What I am trying to do is merge all the worksheets to one worksheet (Merged worksheets) and reposition the information, as it is shown in the merged file. Company ID found in the Target prices should be written in each cell of the merged file as well as the name of the company under "comnam", respective to the dates of closing stock prices.

    At my current level I am not proficient enough to figure out how to do it. Please, if anyone of you have the time and the patience, help me. I would greatly appreciate it!

    I am on Office 2007

    I was unable to attach the files to the messages, it seems that there are some issues with the function as it didn't upload the files. The two files can be found here: http://www.mediafire.com/?snx1ab99oy4b0zb and http://www.mediafire.com/?d3dexoxtsal00vn
    Last edited by randomintel; 01-31-2012 at 06:51 AM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merge worksheets

    Hi randomintel
    Been working on this today along with Forum Issues. I'm including some code that appears to do as you require but, I need you to accommodate me for a moment. I'll ask you to do this:
    Save your "Combined within Targets prices DS.xls" as an .xlsx file with the Name "Source.xlsx". Save your "Merged worksheets.xlsx" as "Target.xlsm". Bear with me...the issues on the Forum have been quite frustrating...I believe we may have a small window of opportunity at this point in time.

    Place these two files ("Source.xlsx" and "Target.xlsm") in the same folder. The code runs from "Target.xlsm". Place this code in "Target.xlsm"...do you know how to do that...if not let me know...then run the code on a COPY of your file (named "Source.xlsx"). Open "Target.xlsm" ("Source.xlsx" SHOULD NOT BE OPEN...the procedure will open it).
    Please Login or Register  to view this content.
    I know this is a bit oblique...the forum has been a bit squirrelly of late...don't usually do things in this manner. If this doesn't translate, perhaps tomorrow will be a better day.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merge worksheets

    Hi randomintel
    Gonna go out on a limb here and try to attach my work files. One will be zipped.
    Didn't work...will try later.

    9:47pm...still no luck uploading.
    Last edited by jaslake; 01-30-2012 at 10:47 PM.

  4. #4
    Registered User
    Join Date
    01-30-2012
    Location
    D.C.
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Merge worksheets

    Hi John. This is incredible and not oblique at all. It all works flawlessly, excellent. Thank you so much for the help, you have no idea how much this helps me.

    Long live you and this forum. Thank you so much again, can't say it enough. You saved me.

+ 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