UDF to return the name of the worksheet in Excel on which this function is located. There are no arguments for this function. Simply input this function in any worksheet and this function will return the name of that worksheet.
This is a really easy to use UDF (user defined function) in Excel and it saves you a lot of time and work when you need to return the name of the worksheet in Excel in which you are working.
Function SHEETNAME()
SHEETNAME = Range("A1").Parent.Name
End Function