+ Reply to Thread
Results 1 to 3 of 3

Retrieving data from 400 worksheets and exporting everything in one other worksheet

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Suisse
    MS-Off Ver
    Excel 2003
    Posts
    3

    Retrieving data from 400 worksheets and exporting everything in one other worksheet

    Hello,

    I have an URGENT request.

    I am experiencing an issue with retrieving data from multiple excel worksheets (about 400) located in one folder and exporting it in one other excel worksheet.

    Each worksheet's structure is the same as the others except for the answers that change from one file to another. I would like to retrieve the data from these 400 worksheets (the ANSWER column for every tab) and export it to OUTPUT.xls having each set of answers in a horizontal display as shown in the output.xls file.

    The 400 worksheets follow the same structure than the Example.xls sheet except for the content which changes.

    What would you suggest?

    Somebody gave me this VBA code but it doesn't seem to work...

    Please Login or Register  to view this content.


    Thanks a lot,
    Attached Files Attached Files

  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: Retrieving data from 400 worksheets and exporting everything in one other worksheet

    Which part of the code does not work?

    If your header is in row1 and your data starts in row2 of the master file, then change this row from
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    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
    Registered User
    Join Date
    07-30-2010
    Location
    Warrington, England
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: Retrieving data from 400 worksheets and exporting everything in one other worksheet

    I had a similar requirement and the fastest solution I found was to use the get external data function. The steps the macro followed were as follows:

    1. Run a routine that lists all the files in a directory
    2. Run through the list and, using the get external data function, import the data.
    3. Copy the data from the file to wherever you want in your workbook
    4. Loop the code until all files have been opened.

    The time taken to run this for about 50 files was a minute or two. You will need to consider file handling etc as well.

+ 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