Forum Discussion

jkpanic's avatar
jkpanic
Copper Contributor
Sep 20, 2019
Solved

Taking worksheet names from cells in another worksheet

I have a work book with numerous worksheets and I want the names of worksheets to automatically update based on changes to certain cells in the 1st worksheet.   For example column A in worksheet 1 ...
  • Subodh_Tiwari_sktneer's avatar
    Sep 20, 2019

    jkpanic 

    To implement the code to your workbook, follow these steps...

    1. Select the Names in column A and click in the Name Box (left to Formula bar where you see the cell address) and type SheetNames so that the selected range will be treated as a Named Range called SheetNames. Refer the image at the bottom to get some visual clue.
    2. Make sure for all the names in the Named Range SheetNames, there are corresponding Sheets in the file in the same sequence as Names in column A.
    3. When you have the above setup, right click on Sheet Tab Training Matrix (the sheet which contains the Names in column A as discussed in above two steps) --> View Code and copy the code from above post and paste into the opened code window which appears after clicking on View Code.
    4. Save your workbook as Macro-Enabled Workbook.

    And you are all set to test the code now.

    Let me know if you have still any doubt in implementing this code to your original workbook.

    Visual clue for Step1.

     

    Visual clue for Step3.

     

    If that takes care of your original question, please don't forget to accept the post with the proposed solution to accept as a Best Answer/Response to mark your question as Solved.

Resources