+ Reply to Thread
Results 1 to 3 of 3

Rename Excel files on base of current file name

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    59

    Rename Excel files on base of current file name

    Dear Experts,

    I need help regarding renaming excel files. sorry if someone had already asked this question.

    I have 1600+ workbooks which i had to rename them, on base of existing names. Condition for renaming is one particular word. If that word exists in that file name, then
    it should add my new word at the starting of current file name

    For example that particular word is "VIP".If this word exists in file name then that file should be renamed by adding word "ACTIVE"

    e.g:
    if file name is : European VIP USD Rates updated as on 23.03.2010
    Then
    it should be renamed as: ACTIVE European VIP USD Rates updated as on 23.03.2010

    similarly if file name has word "INT" then it should add word "INTERNATIONAL" in the starting of that file.
    e.g:
    Today's updated INT Rates as on 28.01.2010
    it should be renamed as: INTERNATIONAL Today's updated INT Rates as on 28.01.2010.


    Thanks in advance.
    Last edited by ali84pk; 06-09-2010 at 08:48 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Rename Excel files on base of current file name

    Try this with copies of your files in a test folder.

    If you are happy it does what you need, run it on the real thing .....

    Please Login or Register  to view this content.

    Call the sub using
    Please Login or Register  to view this content.
    and again with
    Please Login or Register  to view this content.

    IF ALL IS WELL WITH YOUR TEST FOLDER

    Change the path Const to the real thing and run
    Please Login or Register  to view this content.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  3. #3
    Registered User
    Join Date
    10-21-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Rename Excel files on base of current file name

    Dear Marcol,

    Thanks a lot, its exactly what i was looking for.

    you are great!!

    Thanks once again.

+ 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