+ Reply to Thread
Results 1 to 2 of 2

Naming tabs automatically

Hybrid View

planetjed Naming tabs automatically 12-31-2008, 01:54 AM
Leith Ross Hello planetjed, This... 12-31-2008, 05:27 AM
  1. #1
    Registered User
    Join Date
    08-01-2008
    Location
    Wimbledon
    Posts
    10

    Exclamation Naming tabs automatically

    Can anyone tell me if it's possible to program excel to name a tab based on input into a cell in the worksheet. For example: if I enter the date in a specific cell, can excel take that date and name the worksheet by that date i.e. the tab name changes from sheet 1 to the date input in the cell?

    Please help I have 900 of these to do manually.

    Thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello planetjed,

    This macro assumes the name cell for the worksheet is the same on all worksheets. The macro will use the contents of that cell location as the new worksheet name. There may be certain sheets in the workbook you don't want renamed. In this macro the sheets named "Main" and "Summary" are skipped. All other sheets are renamed using the contents of cell "C2". These are all marked in red to make it easy for you to change them.
    Sub RenameSheets()
    
      Dim NewName As String
      Dim Wks As Worksheet
    
        For Each Wks In Worksheets
          Select Case Wks.Name
            Case Is = "Main", "Summary"
              'Skip renaming these sheets
            Case Else
              Wks.Name = Wks.Range("C2").Text
          End Select
        Next Wks
    
    End Sub
    Sincerely,
    Leith Ross

+ 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