+ Reply to Thread
Results 1 to 6 of 6

rename/trim sheet names

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    56

    rename/trim sheet names

    Hi!

    In my workbook, I have several sheets named:

    HTML Code: 
    ...and so on.

    I want to create a macro or code that will take out the "_OTHER" from all the sheets so the sheets name would look like:

    HTML Code: 

    THANKS! for all the help

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: rename/trim sheet names

    Please Login or Register  to view this content.
    Last edited by davegugg; 07-27-2010 at 12:04 PM. Reason: Enforce the sheet name to UCase just in case... ; )
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: rename/trim sheet names

    [edit: too slow - removed dupe code - you might want to enforce the sheet name to UCase just in case...]

    Pending complexity of file you might want to toggle manual calc as a rename will trigger recalculations as necessary.

  4. #4
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: rename/trim sheet names

    Try this out

    Please Login or Register  to view this content.
    EDIT: OMG... I must be very sluggish when it comes to VBA (((
    Last edited by contaminated; 07-27-2010 at 12:04 PM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    43,672

    Re: rename/trim sheet names

    Try this:

    Please Login or Register  to view this content.
    Regards

  6. #6
    Registered User
    Join Date
    06-21-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: rename/trim sheet names

    Contaminated, your code worked PERFECTLY!!

    THANKS everyone 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)

Tags for this Thread

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