SheetName

Gets a sheet name by referencing sheet ID or Sheet No
This is more likely to be used as User-Defined-Function (or UDF) inside Excel workbook, but it also can be used as function, especially since we now have Sheet() and Sheets() functions.
http://xlfxs.com/sheet-and-sheets/

CodeFunctionName
What is this?

Public

Tested

Original Work
Function SheetName(SheetNo)
' Gets sheet name for a given id in thisworkbook
If SheetNo > ThisWorkbook.Worksheets.Count Then
SheetName= "#N/A"
Else
SheetName= ThisWorkbook.Worksheets(SheetNo).Name
End If
End Function

SheetNo

Views 5,001

Downloads 1,388

CodeID
DB ID