+ Reply to Thread
Results 1 to 2 of 2

Renaming multiple files in a Folder

  1. #1
    Registered User
    Join Date
    06-11-2009
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Renaming multiple files in a Folder

    I have a spreadsheet that has the names of a bunch of files in a folder currently in column A. I want to rename them by what i want as their new names in column C. So, can I use a macro to search a folder for the original name, and replace it with the new name in Column C. We'll say the folder filepath is N:\Accounting\Financial Analysis\2010 Budgets. The translate sheet, with the old and new names will be called "Translate Sheet" in the same folder.

    Thanks for your help!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Renaming multiple files in a Folder

    Try this macro

    Please Login or Register  to view this content.
    I've assumed that the old name is in col A and the new one in B, there is a header in row 1 and that the full path is in the cell e.g. C:\temp\test1.txt

    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.
    Martin

+ 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