+ Reply to Thread
Results 1 to 4 of 4

Renaming all sheets based on range of cell Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    02-01-2017
    Location
    Surrey, Canada
    MS-Off Ver
    2013
    Posts
    16

    Renaming all sheets based on range of cell Macro

    Hi guys,

    I am trying to rename sheets in a workbook that has 18 sheets. Is there anyway i can use macro to rename all the sheets in the workbook based on range cell value from b5:b22 in master sheet, i don't want master sheet to be renamed though just all the other sheets?

    Thanks

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Renaming all sheets based on range of cell Macro

    Try this code
    Sub Test()
        Dim i As Long
        
        With Sheets(1)
            For i = 1 To Worksheets.Count
                Sheets(i).Name = CStr(Sheets(1).Cells(i + 4, 2).Value)
            Next i
        End With
    End Sub
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    02-01-2017
    Location
    Surrey, Canada
    MS-Off Ver
    2013
    Posts
    16

    Re: Renaming all sheets based on range of cell Macro

    It works! Thank you very much.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Renaming all sheets based on range of cell Macro

    You're welcome. Glad I can offer some help for you

+ 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] Pasting tables, renaming sheets based on the cell values
    By Szwadron6 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-03-2017, 05:49 PM
  2. [SOLVED] Increasing efficiency of my macro to copy sheets based on cell range
    By benoj2005 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-12-2014, 09:34 AM
  3. Adding new sheets and renaming them according to cell value
    By wjk221 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2014, 03:05 PM
  4. Can anyone here tweek this macro for renaming Excel files based on a cell's contents?
    By chrisd2000 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-01-2014, 02:43 PM
  5. macro to copy a range of worksheets based on cell entry and rename specific sheets
    By Lbischoff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2012, 12:13 PM
  6. renaming sheets macro fails
    By fatpiggy123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2010, 10:18 AM
  7. Macro for renaming sheets
    By Joeg101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2008, 05:40 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