+ Reply to Thread
Results 1 to 5 of 5

make a cell equal a worksheet name

  1. #1
    cyndi
    Guest

    make a cell equal a worksheet name

    Hi, Lets say I have a worksheet named budget, and I want the name of that
    worksheet to appear in a cell, is there a formula that can do that, for
    example =budget!, that doesnt seem to work for me, Thanks


  2. #2
    Kevin B
    Guest

    RE: make a cell equal a worksheet name

    The following custom function will do it for you.

    Function WhoAmI() As String

    Dim wb As Workbook
    Dim ws As Worksheet

    Set wb = ActiveWorkbook
    Set ws = wb.ActiveSheet

    Application.Volatile
    WhoAmI = ws.Name

    Set wb = Nothing
    Set ws = Nothing

    End Function

    In Excel, press Alt + F11 to open the VBE. On the VBE menu, click INSERT
    and select MODULE. Copy or type the formula above from the line Function
    WhoAmI() through End Function inclusive and paste it in the module.

    You can then use the function by type =WhoAmI() in the cell of your choice.
    --
    Kevin Backmann


    "cyndi" wrote:

    > Hi, Lets say I have a worksheet named budget, and I want the name of that
    > worksheet to appear in a cell, is there a formula that can do that, for
    > example =budget!, that doesnt seem to work for me, Thanks
    >


  3. #3
    Elkar
    Guest

    RE: make a cell equal a worksheet name

    See if this works for you:

    =MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1),1)+1,1024)

    HTH,
    Elkar


    "cyndi" wrote:

    > Hi, Lets say I have a worksheet named budget, and I want the name of that
    > worksheet to appear in a cell, is there a formula that can do that, for
    > example =budget!, that doesnt seem to work for me, Thanks
    >


  4. #4
    cyndi
    Guest

    RE: make a cell equal a worksheet name

    your the best, that formula so worked, so did the macro, but I really was
    looking for a formula, thanks so much

    "Elkar" wrote:

    > See if this works for you:
    >
    > =MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1),1)+1,1024)
    >
    > HTH,
    > Elkar
    >
    >
    > "cyndi" wrote:
    >
    > > Hi, Lets say I have a worksheet named budget, and I want the name of that
    > > worksheet to appear in a cell, is there a formula that can do that, for
    > > example =budget!, that doesnt seem to work for me, Thanks
    > >


  5. #5
    Registered User
    Join Date
    08-27-2015
    Location
    Alberta, Canada
    MS-Off Ver
    10
    Posts
    1

    Smile Re: make a cell equal a worksheet name

    Thank you for this solution. Used it on excel 2007 and worked perfect!

    J.

+ 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