+ Reply to Thread
Results 1 to 3 of 3

Error in formula to show sheet name

  1. #1
    Registered User
    Join Date
    09-08-2012
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Error in formula to show sheet name

    I'm using this formula to show the sheet name in a cell in each worksheet.

    =RIGHT(CELL("filename",$A$1),LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1)))

    The problem is if I name the sheet with a number only (no text) it adds a "+0" at the end of the formula. Then if I change the name of the worksheet to a text it give me the error "#value!".

    Any suggestions?

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    1,955

    Re: Error in formula to show sheet name

    try this in A1
    Please Login or Register  to view this content.
    http://www.cpearson.com/excel/excelf.htm
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Contributor BenMiller's Avatar
    Join Date
    12-06-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: Error in formula to show sheet name

    It might be easier to just create this UDF:

    Please Login or Register  to view this content.

+ 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