+ Reply to Thread
Results 1 to 6 of 6

Formula to display Sheet Number in Cell

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Formula to display Sheet Number in Cell

    Is there a formula that can get the sheet number for the current sheet? I have a workbook and the first sheet is titled "Status" and it's labeled as Sheet1 in the VBA project explorer window. I want a cells in Sheet1(Status) to display Sheet1. Is that possible?
    Last edited by Ricker090; 08-14-2012 at 03:53 PM. Reason: Solved

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Formula to display Sheet Number in Cell

    You would need a little VBA function to get the Sheet Code Name

    Place this formula in the cell you want the sheet name
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Place this in a standard Module
    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Formula to display Sheet Number in Cell

    Yep, that worked. I didn't know if Excel already had a formula built in or not, but I guess there isn't one. Thanks for the User Function!

  4. #4
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Formula to display Sheet Number in Cell

    =MID(CELL("filename",A1), FIND("]", CELL("filename", A1))+ 1, 255)
    Regards,
    Vandan

  5. #5
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Formula to display Sheet Number in Cell

    vandan- I needed the sheet number, not the name. Thanks for the response though.

  6. #6
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: Formula to display Sheet Number in Cell


+ 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