+ Reply to Thread
Results 1 to 5 of 5

Getting data from all files in a directory

  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    4

    Getting data from all files in a directory

    I am trying to automate getting data from every file within a folder into a master report file and looking for some direction. Every file is setup identical for data structure and formatting. Every file has two tabs (Accounts & Scorecards).

    Trying for:

    1.) In the Accounts tab or sheet
    2.) Unfilter row 1
    3.) Starting in row 2 until the end of the data
    4.) if column k has data (isn't empty) and the corresponding column L is empty then copy the data (column b, column I, and workbook name)
    5.) with the master report sheet in column a (workbook name that was copied), column b (column b that was copied), column c (column I that was copied)
    6.) go through each file in directory and put each record that meets criteria in 4.) in the master sheet
    7.) add the filter back to the original sheet

    I have attached an example workbook in which the data from row 3 and row 4 would be copied to a master file.

    Thank you for any help!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Getting data from all files in a directory

    Hi,

    Thanks for those clear instructions...
    Just one question. What is the original filter that must be re-initialized?
    Regards,
    Rudi

  3. #3
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Getting data from all files in a directory

    Try this template called "Master" which contains a trigger button.
    The macro will prompt you to select the files in the folder. (Highlight them all and choose OK)
    The rest will be automatically processed....

    Attached...
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-18-2014
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Getting data from all files in a directory

    Thank you Rudi! I won't get a chance to look at until tonight. I forgot to filter when creating the test file 1 but the filter is row 1.

    Thank you again and I will provide feedback once looking at!!

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Getting data from all files in a directory

    @ xcellbeginner, RudiS

    Please refrain from using Private Messages for sharing information about a post. Everyone is left in the dark about what is happening.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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. Moving Files from one directory structure to another directory
    By harddd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2013, 02:39 PM
  2. Replies: 0
    Last Post: 03-13-2013, 09:08 PM
  3. Macro to Move files from one directory to other directory
    By Shanthuday in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2013, 07:21 AM
  4. [SOLVED] Moving data files from one directory to another
    By ernies111 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2012, 12:28 PM
  5. Reading in the files in a directory into an array, directory chosen by user
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2011, 12:52 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