+ Reply to Thread
Results 1 to 12 of 12

I want to Rename the next 15 tabs based on the inputs in the first tab

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    81

    I want to Rename the next 15 tabs based on the inputs in the first tab

    I have an instructions tab followed by 15 item level tabs.

    Say i Have 15 items in the first tab from cell "A1" to cell "A15"

    the items are
    267-00-0006
    267-01-0002
    267-02-0005
    267-02-4281
    267-03-4046
    and so on

    the following 15 tabs should be renamed as mentioned above in the same order i.e the second tab as 267-00-0006........
    Last edited by rshnkmr39; 04-29-2013 at 11:24 AM.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Do the tabs already exist, or do they need to be added/created?
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    the first tab should remain untouched and the values in A1 to A15 can be changes as and when desired

  4. #4
    Registered User
    Join Date
    04-28-2013
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    I can help you with this, Please add me on S kk.,y p.e : Khushboo.enuke

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Hi, rshnkmr39,

    maybe like this:
    Please Login or Register  to view this content.
    And the event for changing directly from Worksheet1:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Last edited by HaHoBe; 04-28-2013 at 01:54 PM. Reason: code for event for worksheet 1 added
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Registered User
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Hi Holger,

    This is awesome.Hope the contents of the workbook do not change i.e data

  7. #7
    Registered User
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Hey Khusboo,

    Thanks ! I do have Skype installed..

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Hi, rshnkmr39,

    Hope the contents of the workbook do not change i.e data
    The name of the worksheets 2 to 16 will change. You should take into consideration that a worksheet name canīt be longer as 30 characters and may not include special characters like \\/:\*\?""<>\|[].

    Ciao,
    Holger

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    @ HaHoBe,

    Hello Holger,

    Very nice,

    In the Sub I would add the following though.

    Please Login or Register  to view this content.
    to prevent the Code to "Bom" out if the Range in Column A on WorkSheet1 is not completely populated.

    Oh yes, almost forgot. The sub does not want to Run with the name as
    Please Login or Register  to view this content.
    I had to change it to Sub Test. Do you know why?
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  10. #10
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Hi, Woinon,

    the ways of both macros as well as checking the sheetname by a function like

    Please Login or Register  to view this content.
    would be ideal - but I guess that in appr. 90+% of all cases it would not be needed. If you want a reliable code the check for the length of the name should as well be included.

    Please Login or Register  to view this content.
    I could not reckognize any problems with the name of the procedure when I inserted the code into a new workbook - and the old one is long gone.

    Ciao,
    Holger

  11. #11
    Registered User
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Great ! Could you let me know how to select multiple tabs and perform a copy paste of a desired range of cells in each tab.

    Example I have a main sheet followed by 15 tabs

    Main sheet Has an input J10

    IF J10 = AU3 of the 15 item tabs
    AU10 to BA 11 needs to be copy pasted as values

    If J10 in the main sheet=BD3
    then BD10 to Bj11 should be copy pasted as values and so on


    If you need more detail please refer to the below link

    http://www.excelforum.com/excel-prog...iple-tabs.html

  12. #12
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: I want to Rename the next 15 tabs based on the inputs in the first tab

    Hello rshnkmr39,

    Edit: Sorry rshnkmr39. I see that you have done what I was asking for below. So please ignore my post..

    Your last post is way of from the topic, and I feel that HaHoBe has gone to great lengths to give you enough to work with.

    So may I suggest that you mark this Thread as Solved, and start a new Thread with your issue at hand as per your last post.

    Thank you.


    @ HaHoBe,

    Nice work Holger!
    Last edited by Winon; 04-29-2013 at 10:54 AM. Reason: Trying to fix a big mistake.:(

+ 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