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 |
SheetName
Thx John.
"J.E. McGimpsey" wrote in message ... 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 |
All times are GMT +1. The time now is 08:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com