+ Reply to Thread
Results 1 to 9 of 9

Rename multiple worksheet from cell values within each sheet

  1. #1
    Registered User
    Join Date
    12-16-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    28

    Rename multiple worksheet from cell values within each sheet

    Hi

    i am looking for coding that renames the current active sheet and the following 4 worksheets with new names based on cell values within each worksheet cells "BA1"

    thanks

    Danny

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: Rename multiple worksheet from cell values within each sheet

    Hi, you could use a worksheet activate event. for each of the four worksheets, just copy this code to the worksheet project

    Please Login or Register  to view this content.
    What this does is when the sheets is selected (activated) it checks if the worksheet's name is the same as the value in BA1 and if that cell is not empty, then it just renames the worksheet
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    12-16-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    28

    Re: Rename multiple worksheet from cell values within each sheet

    Hi

    Thanks for the advice, but unfortunately that idea interferes with the original code. The original code basically duplicates 5 worksheets and moves to the end of the workbook. i basically need the new 5 worksheet to have a new name without effecting the original sheets.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,537

    Re: Rename multiple worksheet from cell values within each sheet

    Please Login or Register  to view this content.
    The way to go is to name the sheets when you copy them.
    A quick example.

    Please Login or Register  to view this content.
    Last edited by jolivanes; 12-23-2021 at 11:48 PM.

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: Rename multiple worksheet from cell values within each sheet

    Quote Originally Posted by Danny1986 View Post
    Hi
    i am looking for coding that renames the current active sheet and the following 4 worksheets with new names based on cell values within each worksheet cells "BA1"
    thanks
    Danny
    My answer was based on your question, or at least the (now clear) incorrect wording of your question, but @Jolivanes saved the day

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,605

    Re: Rename multiple worksheet from cell values within each sheet

    If you are using this code to create copy of the worksheet Sheet1

    Please Login or Register  to view this content.
    then use

    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  7. #7
    Registered User
    Join Date
    12-16-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    28

    Re: Rename multiple worksheet from cell values within each sheet

    Hi Keebellah,

    thanks for your help and yes you did answer to the information i initially gave you. Next time i'll try to be clearer.

  8. #8
    Registered User
    Join Date
    12-16-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    28

    Re: Rename multiple worksheet from cell values within each sheet

    That's great thanks Jolivanes

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: Rename multiple worksheet from cell values within each sheet

    Great, happy coding in 2022, keep safe

+ 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] Rename a worksheet from a cell in the sheet
    By MrBurns in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-16-2021, 05:02 AM
  2. Rename a worksheet from a cell in the sheet
    By MrBurns in forum Excel General
    Replies: 1
    Last Post: 08-16-2021, 03:03 AM
  3. [SOLVED] Excel Macro to Rename each Worksheet based on Cell Values
    By arnel_10 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2017, 05:32 PM
  4. Replies: 1
    Last Post: 07-04-2015, 06:25 AM
  5. Copy Worksheet and rename Sheet to cell value
    By ECEUK in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2015, 03:10 PM
  6. [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
  7. Replies: 5
    Last Post: 07-31-2006, 02:50 AM

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