+ Reply to Thread
Results 1 to 4 of 4

Renaming the file name (or part of the file name) from a list

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    united states
    MS-Off Ver
    Excel 2007
    Posts
    2

    Renaming the file name (or part of the file name) from a list

    I need help with a VBA/macro that will rename multiple files from an Excel list (1) rename the entire file name (2) rename part of the file name.

    my path to the original file is C:\Temp\1234_customer#_$0.xlsx

    (1) Change the whole file name to 4321_customer#_120.xlsx
    (2) Change only part of the name from 1234 to 4321

    Attached file is an example of the list structure for both of my problems.

    Any help is greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Renaming the file name (or part of the file name) from a list

    this is an example, you can modify it for your goal
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    08-28-2012
    Location
    united states
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Renaming the file name (or part of the file name) from a list

    I am struggling to get this to work. I understand the fpath is the destination/renaming folder, but I am trying to reference column B on the attachment as the new file name. I am new to VBA so any help would be greatly appreciated- Thanks in advance!

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Renaming the file name (or part of the file name) from a list

    Not sure about your list(2) though
    This is for List one.
    Sheet1("Rename entire file") must be active before you run the code
    Please Login or Register  to view this content.

+ 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