+ Reply to Thread
Results 1 to 3 of 3

Macros that selects the files according to their names and place them in a separate folder

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    Zurich
    MS-Off Ver
    2010
    Posts
    12

    Macros that selects the files according to their names and place them in a separate folder

    Hello,

    I have a folder containing 4600 txt. files.
    I also have an Excel sheet containing a column with some files from that folder.

    I need to select only some files in a separate folder.
    Could you please help me create a macros that puts all files indicated in Excel column from the txt.folder into a separate folder?

    Thanks a lot!

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Macros that selects the files according to their names and place them in a separate fo

    The attached file will show you how to do it. It uses an Excel table to contain the list of files to copy. I like using tables because they know how many rows and columns they have (you don't have to figure that out in the code) and because you can use the column headers in formulas (no guessing what column X is).

    The code also uses a couple of static named ranges for the source and directory names.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    Zurich
    MS-Off Ver
    2010
    Posts
    12

    Re: Macros that selects the files according to their names and place them in a separate fo

    Wow, thank you so much!!
    You helped me a lot, I could not imagine doing that manually!

+ 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. [SOLVED] Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in sub
    By Rschwar23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 10:06 AM
  2. PPT pages as separate files with files names from Excel
    By Amarjeet Singh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-06-2015, 05:42 AM
  3. macros to list all files in folder THEN get info from files?
    By jonyorker in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-06-2015, 03:11 AM
  4. Macro that goes to Folder, selects- not open- files specified
    By Melissa Camp in forum Microsoft Windows Help
    Replies: 3
    Last Post: 09-09-2014, 10:38 AM
  5. Macro to open all files in outlook and place in a folder
    By ammartino44 in forum Outlook Formatting & Functions
    Replies: 2
    Last Post: 03-21-2014, 02:32 PM
  6. Excel Names in column to text files names to folder
    By excelaron in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 07:22 PM
  7. Replies: 1
    Last Post: 03-12-2013, 04:45 AM

Tags for this Thread

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