MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Sheetname


Posted by William Calliss on February 20, 2001 1:05 PM

Want to have a cell contents yield the result
"Sheetname". It should not be the last active sheet
I have been working on, but the sheetname for the
current viewed sheet. I have used CELL("filename")
as a function, this yields a path/filename/sheetname,
but the sheetname changes to reflect the last active
data entry on any random sheet.


Posted by David Hawley on February 21, 2001 1:32 AM


Hi William

Push Alt+F11, go to Insert>Module and paste in this:

Function SheetName() As String
SheetName = ActiveSheet.Name
End Function


Push Alt+Q. Type =Sheetname() in any cell.


Dave

OzGrid Business Applications