+ Reply to Thread
Results 1 to 5 of 5

Rename folders to values in excel cell

  1. #1
    Registered User
    Join Date
    08-26-2014
    Location
    London,England
    MS-Off Ver
    2010
    Posts
    95

    Rename folders to values in excel cell

    Hi,

    Just need assistance with a macro to rename folders.

    I have a list of folders that have numbers as the folder name ie; 1,2,3 etc. I need a code to rename the folders to include a name based off a an excel spreadsheet.

    In the worksheet Column A = 1 & Column B = John Smith.

    As an example the folder is currently be named 1 and I would need it to be renamed to 1 John Smith.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Rename folders to values in excel cell

    Hi,

    This uses the Name command to change the folder name

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Rename folders to values in excel cell

    @ sweep

    As an example the folder is currently be named 1 and I would need it to be renamed to 1 John Smith.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,174

    Re: Rename folders to values in excel cell

    Herewith my spin.....
    Please Login or Register  to view this content.
    Last edited by sintek; 06-23-2017 at 03:26 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    08-26-2014
    Location
    London,England
    MS-Off Ver
    2010
    Posts
    95

    Re: Rename folders to values in excel cell

    thanks both for the help.

+ 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. [SOLVED] Excel Macro to Rename each Worksheet based on Cell Values
    By arnel_10 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2017, 05:32 PM
  2. VBA Code to Rename Folders
    By jflst in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2015, 01:21 PM
  3. [SOLVED] Code to create Folders and sub folders based on variable cell values
    By maxwell13 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-03-2015, 09:28 PM
  4. [SOLVED] Rename Folders based on Cell in Column B
    By boss1982 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-15-2014, 04:55 PM
  5. Rename Multiple Sub-folders
    By pradeepjassal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2013, 02:56 AM
  6. Rename folders using values from sheet
    By cjconnor24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2009, 05:10 AM

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