Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Worksheet Tab Name As a Cell Value

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is there a formula for getting the worksheet tab name as a cell value ??? Or would a macro be the only way ???

    Thanks for the help !!!

    Alleleuia,
    Bruce Radic

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Best I can come up with here is to type in something like

    Range("A1") = activesheet.name

    in the immediate window.

    Hope this helps

    RET79

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    or
    Sub cellval()
    Range("a1").Value = ActiveSheet.Name
    End Sub
    will do it
    I couldn't get the first example above to work?


    [ This Message was edited by: brettvba on 2002-04-21 17:35 ]

  4. #4
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    Standard way using a cell formula
    =RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1),1))

    The workbook must have been saved for this approach to work.

    Alternatively, you can write simple UDF:
    -----------------------
    Function NameSheet()
    NameSheet = Application.Caller.Parent.Name
    End Function
    ------------------------

    Called as =NameSheet()

    Bye,
    Jay

    [ This Message was edited by: Jay Petrulis on 2002-04-21 18:27 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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