+ Reply to Thread
Results 1 to 2 of 2

Loop multiple files based on specific value

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Edmonton
    MS-Off Ver
    2010
    Posts
    29

    Loop multiple files based on specific value

    Hi again all,

    I have a bunch of folders containing the same information under a master folder.

    These files are .csv's and the name of each file is the same across folders.

    e.g. Folder 1:
    File 1.csv
    File 2.csv
    ... File X.csv

    Folder 2:
    File 1.csv
    File 2.csv
    ... File X.csv

    Folder .... X:
    File 1.csv
    File 2.csv
    ... File X.csv

    Each file represents the same type of data and has the same column order and number (file 1 in folder 1 is the same as File 1 in folder 2).

    I want 1 to X worksheets in a new workbook containing consolidated information (e.g. all file 1 data from all folders in sheet 1; all file 2 data from all folders in sheet 2... etc)

    I have a list of the file names (15) to populate the names of the worksheets and hence the name of the file to pull from. let''s say that that is in A1:A & lastrow

    Clear as mud?? Ideas on how to proceed?

    Thanks

    David

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Loop multiple files based on specific value

    Hi David,

    You need to "run" each directory - you need a list of each folder name.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Loop through multiple files and call macros (but unable to loop)
    By ryanpetersen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2014, 12:04 PM
  2. split text files stored in some location to multiple files based on a condition
    By GIRISH_KH in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2013, 11:32 AM
  3. Replies: 0
    Last Post: 07-11-2013, 02:08 AM
  4. Extract specific column data from specific sheet from multiple files in a folder
    By piggyfox in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-31-2013, 11:51 AM
  5. Loop through multiple CSV files and add data
    By Gretsch308 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2012, 12:57 PM

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