+ Reply to Thread
Results 1 to 5 of 5

Extracting data from multiple excel files

  1. #1
    Registered User
    Join Date
    02-18-2011
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    6

    Extracting data from multiple excel files

    Hi all,

    I am a beginner in macros and am hoping to get some help from here!

    Basically I have a number of excel files with very similar content. They are all tables with headings like "ID", "NAME", "RATING1", "SUBJECT", "RATING2", etc. but they arent in consistent order in all excel files.

    They are all in the same folder. They will be updated from time to time and new files will be added too.

    What I am trying to do is to create a master file which I can extract only a few necessary columns and put them onto the same sheet. Eg only "ID", "RATING1" and "NAME".

    Any help or hint on how this can be done would be much appreciated!! Thank you VERY much!!

    TF

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Extracting data from multiple excel files

    Hi,

    It would be helpful if you posted a dummy worksheet showing what your original data looks like and how you envision the final sheet to look like. JBeaucaire helped me with a similar problem and that may give you an idea where to start http://www.excelforum.com/excel-prog...-workbook.html.

    Good luck.

    abousetta

  3. #3
    Registered User
    Join Date
    02-18-2011
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Extracting data from multiple excel files

    Hi abousetta,

    Thank you for your information. Attached is a dummy version of my original data and the master file that I imagined would look like. There are about tens of these "Dummy1" files in the same folder, and I am hoping to extract a few necessary columns from the data files to one Master file like the attached. Not sure if its possible?

    I am still trying to understand the code and changing bits and pieces to see if it works on mine! But thank you again!

    TF
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Extracting data from multiple excel files

    Hi,

    Try this:

    Please Login or Register  to view this content.
    Its a modified version of the one I am using. The original code was written by JBeaucaire. Hats off to him. You may want to add some lines for formatting if you prefer, but I wasn't sure if the color scheme, column and row width were what you wanted and so I did not add them into the code.

    Good luck.

    abousetta

  5. #5
    Registered User
    Join Date
    02-18-2011
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Extracting data from multiple excel files

    Thank you very much abousetta (and JBeaucaire too). Really appreciate it!

    It works very well apart from a little problem, would it be possible for the code to pick out columns by their heading names rather than the column letters?

    Still googling it, any ideas or hint would be much appreciated!

+ 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