+ Reply to Thread
Results 1 to 6 of 6

Inserting Worksheet name into a cell

  1. #1
    Registered User
    Join Date
    04-27-2005
    Posts
    1

    Inserting Worksheet name into a cell

    Is there a way that Excel can display the name of the worksheet in a cell - similar to the way that the custom header/footer uses &[TAB]?

  2. #2
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Run this macro.
    Please Login or Register  to view this content.
    MS

  3. #3
    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 afternoon Richruss

    You could use a function if you don't fancy using VBA.

    =CELL("filename")

    ...will do the trick.

    HTH

    DominicB

  4. #4
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    I like that Domenic. Does it work for worksheets as well as workbooks?

  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

    Hi Martin

    Thanks for your response. Unfortunately not, to answer your question. There are about a dozen different options that tell you things like the value of the top left cell in a range ("contents"), whether or not the cell is locked ("protect") and the width of a cell, rounded to the nearest whole number ("width"). I don't know if any of these would ever be of use to you, but the filename option is the only one I've ever found useful.

    You probably know from programming VBA that there are hundreds of objects and interesting settings that can return values, but the only way to access most of them is through VBA (or write your own UDF). it's quite a shame really because this function could have been really beefed up allowing you to show user name, creation date, last save date, company etc etc, all of which Excel holds plus much much more.

    DominicB

  6. #6
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Hmmm - I thought you were going to say that. I couldn't see the answer in Excel's help files.

    Cheers
    MS

+ 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