Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    Watford, Hertfordshire, England
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sheetname from formula (2003 SP1)

    I am putting a formula in a cell on every sheet to show the name of the sheet at the top. The formula is
    =RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))

    Trouble is every time I recalculate the book all sheets show the same sheet name as the sheet I am on when I recalculate.

    Got a better formula?
    Neil Eustice
    Woody Worshipper

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sheetname from formula (2003 SP1)

    Try this formula:

    <code>
    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,20)
    </code>
    Legare Coleman

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Sheetname from formula (2003 SP1)

    Try this variation:
    <code>=RIGHT(CELL("filename",A1),LEN(CELL("filenam e",A1))-FIND("]",CELL("filename",A1)))</code>

    The reference to A1 forces it to use the sheet the formula is in.

  4. #4
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    Watford, Hertfordshire, England
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sheetname from formula (2003 SP1)

    Works a treat. Thanks
    Neil Eustice
    Woody Worshipper

  5. #5
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    Watford, Hertfordshire, England
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sheetname from formula (2003 SP1)

    This works. Thanks
    Neil Eustice
    Woody Worshipper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •