+ Reply to Thread
Results 1 to 6 of 6

Extract data from multiple workbooks

  1. #1
    Registered User
    Join Date
    09-25-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Extract data from multiple workbooks

    Hi Folks,

    Need your expert help and advice for the following problem. I apologize for being too descriptive about the problem

    I have 15 workbooks and a Master workbook with multiple worksheets.

    I need to extract the data from these 15 workbooks and paste them to a specific sheet named 'Summary' on the master workbook.

    Problem is, all the 15 workbooks have headers which are inconsistent. They do not match the header of the 'Summary' worksheet in the Master workbook.
    I usually create a copy of the original workbooks (so that i have a backup of the all 15 orignal workbooks) and manually delete the columns which are not required and arrange the headers and the corresponding data to match the header of the 'Summary' worksheet in the Master workbook and then paste the data to the 'Summary' worksheet.

    Is there a way to automate the following tasks using VBA
    1) Make a copy of each of the 15 workbooks.
    2) Deleting the unwanted columns from 15 workbooks by comparing it with the header in the Summary worksheet of the Master workbook.
    3) After Step2 , paste the required data (from the 15 workbooks) into the Summary worksheet of the Master Workbook.

    Thanks again, Appreciate your help!
    Archer
    Last edited by mclav; 10-06-2011 at 04:44 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: Extract data from multiple workbooks

    Yes this can be done.

    Please attach a sample of the original workbook and of the master workbook.

  3. #3
    Registered User
    Join Date
    09-25-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Extract data from multiple workbooks

    Sure, i have attached 3 excel workbook with dummy data and a Master xls with Summary worksheet. The Summary worksheet has the required Column Header format.

    Thanks again!

    Archer
    Attached Files Attached Files

  4. #4
    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: Extract data from multiple workbooks

    Hi mclav

    This code is in the attached. It appears to do this
    paste the required data (from the 15 workbooks) into the Summary worksheet of the Master Workbook
    without having to do this
    1) Make a copy of each of the 15 workbooks.
    2) Deleting the unwanted columns from 15 workbooks by comparing it with the header in the Summary worksheet of the Master workbook
    See if it works for you.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    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.

  5. #5
    Registered User
    Join Date
    09-25-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Extract data from multiple workbooks

    Thanks a lot and apologize for responding late. The code works for me

    Appreciate your help!!!

  6. #6
    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: Extract data from multiple workbooks

    Hi Archer
    You're welcome...glad I could be of help.

+ 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