+ Reply to Thread
Results 1 to 6 of 6

Macro to add additional word in file name

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    Macro to add additional word in file name

    Here is an example of one of the file names used: Export_20130528 - 226.XLS

    I have the file name listed in cell P3. What I need is the macro to automatically save the file as Export_20130528 - 226 (REVISED).XLS

    Thank you.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Macro to add additional word in file name

    Hi Dnakr,

    In p3 enter "Export_20130528 - 226" - without quotes
    and use below macro:-

    Please Login or Register  to view this content.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    01-22-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Macro to add additional word in file name

    Thank you DILIPandey, worked great.

    Could I bother you for one more thing? How can I tell it to save to a certain folder?

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Macro to add additional word in file name

    Okay... in that case you can update the save as code line as ActiveWorkbook.SaveAs Filename:="C:\Users\DILIPandey\Desktop\" & i


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Registered User
    Join Date
    01-22-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Macro to add additional word in file name

    Thank you worked great.

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Macro to add additional word in file name

    you are welcome..... cheers



    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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