+ Reply to Thread
Results 1 to 4 of 4

Copy Sheets from multiple workbooks and add them to master workbook

  1. #1
    Registered User
    Join Date
    04-29-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Copy Sheets from multiple workbooks and add them to master workbook

    Hello

    I have a folder containing multiple .csv files. The .csv files all contain 1 sheet with data in columns A,B,and C. I would like to be able to copy each sheet from every .csv file into 1 master file. Each files sheet is named differently. I have found multiple posts on here that relate a little but I cannot seem to adapt them to what I need. I am using Excel 2010.

    The only thing I would like to add is that the directory of where the files are located I would like to be able to change. This file will be given to many different users and being able to select the desired location of the files is a must.

    Help would be much appreciated. Thanks
    Last edited by tjkain; 04-29-2013 at 02:13 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Sheets from multiple workbooks and add them to master workbook

    Do you want the sheets to be copied as a whole? Or do you want the data to be copied into 1 sheet in the master file, 1 below the other?

    If its the former, do you want the sheets to be named as per the file name?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    04-29-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Copy Sheets from multiple workbooks and add them to master workbook

    I want the sheets to be copied as a whole, the sheets are named appropriately in all the .csv files.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Sheets from multiple workbooks and add them to master workbook

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

+ 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