+ Reply to Thread
Results 1 to 5 of 5

How to find a file name in Old Folder then save in New Folder if found

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    How to find a file name in Old Folder then save in New Folder if found

    Hello All,
    I have a list of file name in Sheet1 then how can I find those file name in one foder "Old Folder",/. If found then save it into new folder "New Folder"

    Ex:
    Sheet1
    filename1
    filename3
    filename4
    filename5
    filename6
    filename7
    filename8
    filename9
    filename10

    Old Folder (there's total of 5 file name)
    filename1
    filename2
    filename3
    filename4
    filename5

    New Folder (4 files was found that match in sheet 1 then saved into New Folder
    filename1
    filename3
    filename4
    filename5

    Regards,
    tt3

  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: How to find a file name in Old Folder then save in New Folder if found

    Something like this... edit as needed:

    Please Login or Register  to view this content.
    _________________
    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!)

  3. #3
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: How to find a file name in Old Folder then save in New Folder if found

    Hi JB,
    Somehow code doesn’t work (could be the file name issue and format like: 12-34567-00 Z or 123-45678-901 X). Can you modify to search the first left 10 digit only.

    This is excel file
    Regards,
    tt3
    Last edited by tuongtu3; 03-08-2018 at 04:56 PM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to find a file name in Old Folder then save in New Folder if found

    I can, but the 10 characters you demonstrated in the post above are not matches, so that wouldn't work either.

  5. #5
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: How to find a file name in Old Folder then save in New Folder if found

    Hi JB,
    Can you help with first left 12 digit of this format number 12-345678-00.

    Regarfs, tt3

+ 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. Create Folder & Check if Folder Exists if Not Create Folder & then Save File
    By Quivolt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-28-2017, 05:31 AM
  2. [SOLVED] Lookup folder from cell text, then save excel file in this folder
    By dodgybob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-14-2014, 09:00 AM
  3. [SOLVED] Save File to folder Where folder is referenced in cell
    By Will_iam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-16-2013, 08:35 AM
  4. Save a file to a folder, create folder if it doesn't exist
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2010, 09:12 AM
  5. Create Folder with system date then save file to folder
    By cartotech81 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2009, 02:12 PM
  6. Replies: 6
    Last Post: 08-11-2006, 03:41 PM
  7. Replies: 1
    Last Post: 02-24-2006, 02:10 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