+ Reply to Thread
Results 1 to 2 of 2

Rename worksheet based on cell value

  1. #1
    Registered User
    Join Date
    07-15-2015
    Location
    Boston
    MS-Off Ver
    13
    Posts
    3

    Rename worksheet based on cell value

    Hello,

    I used the below to rename tabs in my excel file, but it renames every sheet with the specific cell number. I would like to only rename tabs that fall within my start and end sheets. Any help?

    Sub UpdateSheetNames()
    On Error Resume Next

    For Each ws In Worksheets
    ws. name = ws.range("A2").Text
    Next ws

    End Sub

    Thanks,

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2007/2010/2013
    Posts
    1,416

    Re: Rename worksheet based on cell value

    yes.

    The worksheets are indexed from left to right - as they appear in the user's view.


    So, if you mean 'between' as in, the tabs for the worksheets are between the tabs of two sheets try:
    NOTE: This code skips the start sheet name worksheet - so it will rename the sheets starting after the 'start sheet name'.


    Please Login or Register  to view this content.
    Last edited by GeneralDisarray; 07-15-2015 at 12:01 PM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

+ 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. Rename worksheet based on cell value
    By sbeirne58 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2015, 12:11 PM
  2. Rename worksheet based on cell with formula
    By JimmyT10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2015, 08:44 AM
  3. [SOLVED] Rename worksheet tab based on cell value
    By Tritekfire in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-08-2014, 04:22 PM
  4. [SOLVED] Rename Multiple worksheet based on what is contained in one cell in that sheet.
    By pjmc84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2013, 11:20 AM
  5. Copy worksheet and rename based on cell range
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-08-2011, 06:53 AM
  6. Rename worksheet based on content in Cell C3
    By jieyi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-09-2009, 12:37 PM
  7. VBA to rename worksheet based on cell reference on another worksheet
    By Sandi99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2008, 01:46 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