+ Reply to Thread
Results 1 to 6 of 6

Change the name of each sheet of all file with the same name

  1. #1
    Registered User
    Join Date
    04-03-2017
    Location
    italy
    MS-Off Ver
    2010
    Posts
    83

    Change the name of each sheet of all file with the same name

    Good afternoon.

    In a folder I have several excel files that have a sheet inside them, with the same file name.
    Outside the folder I would like to include in a excel file a macro to change the name of the sheet of each file, giving the sheet a same denomination, valid for all files.

    It's possible to do it?

    Thank you

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Change the name of each sheet of all file with the same name

    Ciao Stefano. Could you please explain in more detail by using an example. What is the actual name of the sheet in each of your files? What is the new name that you want to assign to each sheet?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    04-03-2017
    Location
    italy
    MS-Off Ver
    2010
    Posts
    83
    Quote Originally Posted by Mumps1 View Post
    Ciao Stefano. Could you please explain in more detail by using an example. What is the actual name of the sheet in each of your files? What is the new name that you want to assign to each sheet?
    Name file 1: it
    Sheet name: it

    Name file 2: fr
    Sheet name: fr

    after the macro is turned on the name changes as follows:

    Name file 1: it
    Sheet name: geonames

    Name file 2: fr
    Sheet name: geonames

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Change the name of each sheet of all file with the same name

    Try this macro in a new workbook. The macro assumes that only the files that you want to change are in the source folder and that the index number of the sheet you want to change is 1: for example: Sheet1("it"), Sheet1("fr"). Change the folder path in the code to suit your needs.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-03-2017
    Location
    italy
    MS-Off Ver
    2010
    Posts
    83

    Re: Change the name of each sheet of all file with the same name

    Good morning.

    The macro does not work well.

    Also, is possible to change the macro code so that i can select the folder that contains the files (this folder is in the "GEONAMES" folder) and delete the blank sheets?

    I attach a sample file.
    link:

    https://www.dropbox.com/s/fu2zhrl6ob...umps1.zip?dl=0

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Change the name of each sheet of all file with the same name

    Try this macro. Your files are very large so be patient with the amount of time it takes to run the macro. When the 'Select Folder' window opens up, you will be able to choose the sub folder. Make sure that only the files you want changed are in that subfolder.
    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)

Similar Threads

  1. Worksheet Change Event - Save file after tenth change
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2017, 09:19 AM
  2. Find a cell in one file.sheet and bring it into another file.sheet
    By fred3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2014, 01:56 PM
  3. Copy / Paste Values Only one sheet into another file from a multi sheet excel file
    By srisri201012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2013, 12:56 PM
  4. Macro to change sheet name to file name
    By ozne99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2013, 03:13 PM
  5. Macro to change Pivot Data to new sheet, where sheet name will change
    By sarails in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2010, 12:10 AM
  6. Replies: 1
    Last Post: 11-01-2009, 05:01 AM
  7. Change file path in formulas for every cell in a sheet
    By jackthefork in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-15-2009, 12:22 PM

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