SheetName
One way:
Public Function SheetName() As String
SheetName = Application.Caller.Parent.Name
End Function
You can also do it without UDFs:
=MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255)
Note that the file needs to be saved for this to work.
In article ,
"Heapy" wrote:
I need to develop a function that returns the name of the worksheet on which
the function is located.
It's probably a simple little thing, but I can't think of it right now.
Thx
HWH
|