Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Worksheet name in a formula (2003)

    I've just been reading about the CELL information function. It can give you just about anything from a cell's address and the file name of the workbook it belongs to, to details of your operating system and how much memory you have / are using. But what it can't apparently tell you is the name of the worksheet on which it's found. Does anyone know of an Excel formula that can do this?
    Waggers
    If at first you do succeed, you've probably missed something.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Worksheet name in a formula (2003)

    The =CELL("filename",A1) form of the function will return the file name including the sheet name so you can extract it from this - using MID and FIND - searching for a ] character which signifies the end of the workbook name.
    HTH.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Worksheet name in a formula (2003)

    Thanks Rory. For anyone straying across this thread later, here's the resulting formula in full:

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1),1)+1,LEN(CELL("filename",A1) ))
    Waggers
    If at first you do succeed, you've probably missed something.

Posting Permissions

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