Returns the name of the worksheet in a given position.
'iSheetNo - The number of the worksheet you want the name of.
Public Function WORKSHEETNAME(Optional ByVal iSheetNo As Integer = -1) As String
If iSheetNo = -1 Then
WORKSHEETNAME = Application.ActiveSheet.Name
WORKSHEETNAME = Application.Sheets(iSheetNo).Name
You can also get the name of the worksheet by using the CELL function.
You can use the following formula
=MID(CELL("filename",A1)), FIND("]",CELL("filename",A!)) + 1, 1000)
In Power Utility Pak this function is called SHEETNAME
reference = Optional, a cell on the sheet that you want to get the name from. If omitted the name of the current sheet is returned.
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext