ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheetname in a cell (https://www.excelbanter.com/excel-programming/280646-worksheetname-cell.html)

worksheetname in a cell

worksheetname in a cell
 
How can I get the name of a worksheet in a cell of that worksheet?

Thank you

J.E. McGimpsey

worksheetname in a cell
 
one way:

=MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255)

Note: The file needs to be saved for this to work.

In article ,
"worksheetname in a cell"
wrote:

How can I get the name of a worksheet in a cell of that worksheet?

Thank you


Tommy Flynn

worksheetname in a cell
 
Sub ShowName()
Range("A1") = ActiveSheet.Name
End Sub

Regards,

Tommy Flynn


"J.E. McGimpsey" wrote in message
...
one way:

=MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255)

Note: The file needs to be saved for this to work.

In article ,
"worksheetname in a cell"
wrote:

How can I get the name of a worksheet in a cell of that worksheet?

Thank you





All times are GMT +1. The time now is 12:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com