+ Reply to Thread
Results 1 to 11 of 11

Worksheet Tab - Naming

  1. #1
    Registered User
    Join Date
    06-30-2007
    Posts
    26

    Worksheet Tab - Naming

    Sorry didnt know which area to ask this question. So seeing as I am new, thought I would start here.

    Is it possible to insert a name on a worksheet tab from a cell on the worksheet?

    i.e If A7 = Blue The worksheet would be named Blue.

    Or am I asking the impossible

    Hope someone can help

    Dave

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Not as a normal Excel function

    It can be done via a macro
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    06-30-2007
    Posts
    26
    Thank you for your reply. I am new to Excel, so I will have a go at working it out.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This may get you started. It's a worksheet event macro

    http://www.contextures.com/xlvba01.html#Worksheet

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning dave6726

    ...and welcome to the forum!!

    Or am I asking the impossible
    Certainly not.

    My add-in (available via the link below) has a utility that can rename one, some or all tabs after a range. If you download and install it go to Ultimate > Sheets > Add / Rename Multiple Sheets and go to the Insert / Rename from Cell tab.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  6. #6
    Registered User
    Join Date
    06-30-2007
    Posts
    26
    Well guys thanks for the help. Been trying to work through them.

    VBA Noob, must admit I like yours, seems quite easy. I thought you had cracked it for me, but the name I am trying to put on the sheet comes from another cell via a formula. E.g date from a sheet is 01/01/2007, on the sheet i need naming with that date. I have cell H1 with formula of =Master!C6. In H2 I have formula =H1, with the cell formatted throug Custom to read ddmmm. The result in H2 is 01Jan. Its this that I want to get onto the sheet tab.

    If I manually type it in it works. But if I try it as stated above it does not change at all. Any ideas?

    But much appreciated to you all. Will try everything in time.

    Dave
    Last edited by dave6726; 07-03-2007 at 01:14 AM.

  7. #7
    Registered User
    Join Date
    06-30-2007
    Posts
    26
    Anyone else any ideas on this? Would be appreciated

    Thanks to the guys above

  8. #8
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi dave6726

    Not quite sure what you're using at the moment to achieve this - if you want to take this further try posting what you've got at the moment to work on. I assume you're using something like :
    Please Login or Register  to view this content.
    This of course would cause problems as it's attempting to place a "/" in the sheet name which, according to Excel, is just not on.

    You need to force Excel to use the format you require from the cell, rather than just reading a straight value. Not sure how this will fit into what you've got, but something like this will work for you :
    Please Login or Register  to view this content.
    HTH

    DominicB

  9. #9
    Registered User
    Join Date
    06-30-2007
    Posts
    26
    I am using a suggestion above

    Please Login or Register  to view this content.
    This works fine if I type a value int A7 i.e 04Jul
    But not if A7 takes it value from another cell i.e =Sheet1!A1
    Although I have formated A7 as Custom ddmmm

    Its the result in A7 that I want as the worksheet tab name


    Sorry If my explanation is confusing. I did say I was new to it
    Last edited by VBA Noob; 07-05-2007 at 01:37 AM.

  10. #10
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi dave6726

    You just need to integrate my line into your existing code, thus :
    Please Login or Register  to view this content.
    HTH

    DominicB

  11. #11
    Registered User
    Join Date
    06-30-2007
    Posts
    26
    Thanks a lot for l the help guys. You dont know how long I have been looking at that one.

    Thanks to dominicb, VBA Noob and mudraker, its much appreciated

+ 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