+ Reply to Thread
Results 1 to 3 of 3

Naming a sheet

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    267

    Naming a sheet

    Hi:

    How can I name the sheets in a file with the content of a particular cell on every sheet.

    For example, cell A2 of every sheet contains the name of a person in the team. How can I automatically name each sheet with the particular name in cell A2?

    Sheet 1 has John in cell A2
    Sheet 2 has Peter in cell A2
    Sheet 3 has Mark in cell A2

    and so on....

    Sheet 1 should automatically get named John, Sheet 2 Peter, Sheet 3 Mark and so on.... such that as I keep adding sheets in the file, the new sheet should automatically get named with the name contained in cell A2...

    Thanks & Regards,
    Regards,
    Navin Agrawal

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Naming a sheet

    Try this
    Please Login or Register  to view this content.
    Copy the Excel VBA code that you want to use
    Select the workbook in which you want to store the code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects
    Right-click on the ThisWorkbook object, and choose View Code
    Where the cursor is flashing, choose Edit | Paste

    When you click on "save" on your file, the sheetnames will be changed accordingly.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    267

    Re: Naming a sheet

    Thanks a lot.... appreciate your help....

+ 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