Functions & Tab Names

  • Thread starter Thread starter HpyTrvlr69
  • Start date Start date
H

HpyTrvlr69

My question is simple.

Does anyone out here know of a function that returns the name of a specific
TAB in a workbook?
 
I only know of a trick formula that will return the value of the sheet the
formula is entered into:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

What did you have in mind? How would you envision this function working?
What are your requirements?
 
Thank you for your reply RocketSci. I think that will work for what I am doing.

p.s. Im not a Rocket Scientist.....no ..really.

JBeaucaire said:
I only know of a trick formula that will return the value of the sheet the
formula is entered into:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

What did you have in mind? How would you envision this function working?
What are your requirements?

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


HpyTrvlr69 said:
My question is simple.

Does anyone out here know of a function that returns the name of a specific
TAB in a workbook?
 
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Entered in a cell exactly as above will return the name of the sheet.

Note: workbook must have been saved at least once.

Couple more using VBA

Sub getname()
MsgBox ThisWorkbook.ActiveSheet.Name
End Sub

Sub get_Sheetname()
Dim num As Long
num = InputBox("Type a number")
MsgBox "Sheet" & num & "'s name is " & Sheets(num).Name
End Sub



Gord Dibben MS Excel MVP
 
Back
Top