+ Reply to Thread
Results 1 to 6 of 6

Open 132 files and copy data into master file

  1. #1
    Forum Contributor
    Join Date
    11-18-2008
    Location
    uk
    MS-Off Ver
    Excel 2003 and Excel 2010(sometimes)
    Posts
    139

    Open 132 files and copy data into master file

    Hi All

    I would like to open 132 files with different names from 1 to 132 and then copy data from each file and paste into a new master file

    please point me in the right direction

    Many thanks

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

    Re: Open 132 files and copy data into master file

    In what format are these files? .xlsx or .xls or .csv?

    Are all these files stored in one folder?

    Is it only one sheet that needs to be copied from each of these files?
    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
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,933

    Re: Open 132 files and copy data into master file

    Here is one solution:

    http://chandoo.org/wp/2012/04/09/con...cel-files-vba/

    and a second solution:

    http://stackoverflow.com/questions/1...her-results-fi
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    11-18-2008
    Location
    uk
    MS-Off Ver
    Excel 2003 and Excel 2010(sometimes)
    Posts
    139

    Re: Open 132 files and copy data into master file

    Hi

    Thanks for the quick responses

    Yes all of the files are in one location and i only really need to copy about three rows from each file

    so on the master file i have two sheets and the rows from the first file are pasted into Sheet2 of the master file, then the next set of rows pasted in in the next row down and so on until all 132 files are been done.

    i hope this helps


    i have looked at the links and i dont understand the code - sorry

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

    Re: Open 132 files and copy data into master file

    Also what format are the files in? If you are using excel 2007 or 2010, please update the same in your profile so its easier to help you.

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

    Re: Open 132 files and copy data into master file

    Try this code considering your format is .xlsx. Change the path in the code to match your system path where the files are stored -
    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)

Similar Threads

  1. [SOLVED] Auto copy data from other Excel files to master file...
    By NeoNirav in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2013, 12:13 AM
  2. [SOLVED] Need help! Macro to open sequentially named files, copy and paste data into a master file
    By derrickk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-05-2013, 03:35 PM
  3. Replies: 0
    Last Post: 04-19-2012, 03:31 PM
  4. Help: Open all xlsx files in dir, copy data from cells and paste in 1 master xlsm
    By dgibson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2011, 04:17 AM
  5. Open a file and copy data into multiple files
    By ncduke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2010, 09:39 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