+ Reply to Thread
Results 1 to 9 of 9

Naming worksheets after Cell Value

  1. #1
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Naming worksheets after Cell Value

    Hello Excel Forum!

    I am currently working on a spreadsheet that has Names of students in Cell A1 on some of the wortksheets within the workbook. I am wondering if it is possible to use VBA or Macros to Name the worksheet the same as whatever name is in A1 of the worksheet.

    I have looked all over the internet and codes that are said to work are not for me, i feel like i am missing one key aspect.

    I hope someone can advise.

    Thanks

    James

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Naming worksheets after Cell Value

    Hi, Jamidd
    So, only some sheets in the workbook needs to be renamed.
    Try this macro. It will open a dialogue box and ask you to change each sheet name.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Naming worksheets after Cell Value

    Hello,

    Thank you very much this worked a treat.

    Is there a way to make this so it only changes the ones that have changed or so it has an option to select no if you do not wish the name to change?

  4. #4
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Naming worksheets after Cell Value

    Is there a way to make this so it only changes the ones that have changed
    I don't understand this, can you explain?
    so it has an option to select no if you do not wish the name to change?
    The dialogue box give you the options not to change name, right?

  5. #5
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Naming worksheets after Cell Value

    Sorry, double posting. Bad internet connection.
    Last edited by Akuini; 02-12-2016 at 02:49 PM. Reason: double posting

  6. #6
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Naming worksheets after Cell Value

    Sorry im not quite sure what i was asking!

    I am now having an issue with the code where it is asking to rename the first sheet but then it comes up with a message just saying 400. Would you know why this would be?

    Thanks

  7. #7
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Naming worksheets after Cell Value

    The message only say '400'? no other text? no text say 'error' or something?
    What happen after that?
    Well, I don't know why this would be. Can you post the screen image?
    BTW, I modified my macro a bit, so it will skip sheets which name is already the same with cell A1 value. Try it.
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Naming worksheets after Cell Value

    Thank you very much!

    This has solved the issue of the 400 message and the new code also saves more time as the first code as i it no longer asks to rename every sheet just the ones where A:1 has changed

  9. #9
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Naming worksheets after Cell Value

    Ok, glad to help and thanks for replying.

+ 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. Naming multiple worksheets using cell in that sheet
    By brandnew22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 01:30 PM
  2. Creating and naming multiple worksheets; copying contents to new worksheets
    By HeadfortheHills in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2012, 08:49 AM
  3. naming a column & naming a cell with a number
    By evanzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2008, 10:49 PM
  4. Naming worksheets based on cell values
    By F6Hawk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-03-2007, 04:31 PM
  5. Naming Worksheets
    By LIAMT in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  6. [SOLVED] Naming Worksheets
    By LIAMT in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. Naming Worksheets
    By LIAMT in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. [SOLVED] Naming Worksheets
    By LIAMT in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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