+ Reply to Thread
Results 1 to 2 of 2

Retrieve data from a series of worksheets in a directory

  1. #1
    Registered User
    Join Date
    03-16-2012
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Retrieve data from a series of worksheets in a directory

    Hi,

    I have a folder and within this there are 5 other subfolders

    What I would like a macro to do is list the excel files within these folders, and then in the columns next to it retrieve the data from cells A3:AV3 on say, Sheet1, of each file.

    So it would look like this:

    Folder A

    File1.xls [data here..........]
    File2.xls [data here..........]


    Folder B

    etc.

    I found a couple sites with code to loop through a directory etc but was unable to get it to work,

    Can anyone help?

    Thanks!
    Last edited by wahlberg; 03-27-2012 at 05:31 AM. Reason: change to requirements

  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: Retrieve data from a series of worksheets in a directory

    This is based on the macro published here:

    Workbooks To Sheets - Part 3


    Just edit the main fPATH to your main folder and run it. If any workbook does not have a "sheet1" it will prompt you to select a sheetname from the currently examined workbook.

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 03-27-2012 at 10:12 AM.
    _________________
    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!)

+ 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