+ Reply to Thread
Results 1 to 4 of 4

Copy cells from multiple worksheets and workbooks to one master workbook

  1. #1
    Registered User
    Join Date
    06-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    2

    Copy cells from multiple worksheets and workbooks to one master workbook

    Hi Guys,

    Let me start by saying that I'm quite new to excel programming and hope this is the correct forum to put this in. What I have is twenty workbooks (Named 1-20.xls) and a master workbook(Master.xls). I am wanting to copy the data that's in the column "K" on four of the workbooks, worksheets (named 1,2,3,4) and paste that data into the "Comments" tab in the master workbook. Currently the macro copies only the column from one sheet and pastes into a new workbook.
    The code(Found here is:
    Please Login or Register  to view this content.
    Is it possible to copy all the sheets, have the pasted data from each workbook in one column and paste it into the "Comments" sheet on the Master workbook?

    Any help would be greatly appreciated.

    Edit:

    Have managed to make a macro that can do this, the code for anyone curious is:


    Please Login or Register  to view this content.
    Cheers~
    Last edited by Concept; 06-30-2012 at 01:40 PM. Reason: Found a solutuion

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy cells from multiple worksheets and workbooks to one master workbook

    Try this,
    If you can put all your filess into one subfolder, this will go through each file in that folder and copy the ranges you want. Don't put anything else in that folder but the files you want data from. Also, don't put the master workbook in there either. Make sure you change the folders path in the code as well.

    Please Login or Register  to view this content.
    Last edited by JapanDave; 06-30-2012 at 01:43 PM.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    06-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    2

    Re: Copy cells from multiple worksheets and workbooks to one master workbook

    Hi JapanDave,

    Thanks for your response! I am trying to run the code but getting the following error "Run-Time error'1004':"

    "" could not be found. Check the spelling of the file name, and verify that the file location is correct." Clicking debug shows
    Please Login or Register  to view this content.
    to be the cause.

    ** I have found a solution to the problem and have posted the code I have used in the original post above. Thanks again for your assistance. **
    Last edited by Concept; 06-30-2012 at 01:42 PM.

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy cells from multiple worksheets and workbooks to one master workbook

    Whoops, mistype

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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