+ Reply to Thread
Results 1 to 5 of 5

Extracting multiple values from multiple files into a master file

  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Extracting multiple values from multiple files into a master file

    I have several .xlsm files which are all formatted the same. I need to extract data from the same cells in each file to build a master table in another spreadsheet. I need the data from each file to be on one row of the new spreadsheet.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Extracting multiple values from multiple files into a master file

    1 easy way would be to open the master and 1 if the data files, and then, from the cell where you want the answer, just reference the cell in the data sheet. you can then just copy this across to where you need to.

    for the other data files, just change the file name, and repeat the above

    let me know how you make out?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-10-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Extracting multiple values from multiple files into a master file

    Thank you for your reply. I have considered that option, but I have approximately 40 separate files, and the file names not standard. I need a solution which will open each file in the directory, extract the data to a row in the master file, close the source file and repeat with the next file. This would create a new row for each file in the master file.

    I have seen some code which will do this with a row, or a column, or a single cell. I need to be able to extract data from several specific cells each time. The cells are the same on every file, but they are not all in one row or column.

  4. #4
    Registered User
    Join Date
    08-10-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Extracting multiple values from multiple files into a master file

    I have been attempting to use this code, but I have two areas of difficulty:
    This code will not define the Currentfilename variable, and I have set the data range in the source book with comma delimited cell references. I do not know if that will work. Help Please!

    Please Login or Register  to view this content.
    Last edited by Cutter; 09-19-2012 at 04:29 PM. Reason: Added code tags

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Extracting multiple values from multiple files into a master file

    @ Alley oop

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    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