+ Reply to Thread
Results 1 to 4 of 4

Macro to capture data from multiple excel files into another master workbook

  1. #1
    Registered User
    Join Date
    11-22-2012
    Location
    Bangalore, Karnataka, India
    MS-Off Ver
    Excel 2003
    Posts
    7

    Macro to capture data from multiple excel files into another master workbook

    Hi All,

    I have a folder which contains more than 300 excel files and each file has data in a sheet named "summary" starting from "a3:bg3". All the files are stored in C:\Documents and Settings\xxx\Desktop\New Folder and each file is named after the person who has taken a test.

    I need a vba code to fetch data from the sheet "Summary", from all files, and paste in a master workbook (in the same folder) starting from A2:BG2 and keep on adding in a3, a4. a5..... and continue till all the excel files data has been copied. It will also be helpful if a new folder is created "Completed" and the files moved into this post the data has been pasted in the master workbook.

    Note: There might be few blanks in the range and hence the data has to be captured from A3:BG3.

    I have tried few codes for this but since am relatively new to VBA am finding it hard to complete

    If you can please provide me a code that will do this activity, i'd be glad as i have to submit this by Friday the 7th Dec'12.

    Help is appreciated.

    Regards,
    Amaresh Babu K S

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to capture data from multiple excel files into another master workbook

    There are many macros on my site that do things like this.... for instance, in your case:

    'WORKBOOKS TO 1 SHEET STACKED
    Here's a macro for collecting data from all files in a specific folder.The parts of the code that need to be edited are colored to draw your attention.


    You'll notice this macro also moves files to an IMPORTED folder in the same folder as the original files... just as you'd mentioned.

    The main "tweaks" you have to make are in the "customize this section" portion:

    ORIGINAL
    Please Login or Register  to view this content.
    You don't need the LR part since you're always taking from the same place. So it would probably change to:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 12-27-2019 at 10:34 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-22-2012
    Location
    Bangalore, Karnataka, India
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Macro to capture data from multiple excel files into another master workbook

    Thank you Jerry. You are a star and you code has helped me finish the job quicker and deliver the project a day prior to the due date.

    Thanks a ton.

    Regards,
    Amaresh babu K S

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to capture data from multiple excel files into another master workbook

    Glad to help. Remember to pay it forward!

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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