copy name from active sheet to cell - using macro or function
Hello,
I'm newbie I'm looking for function or macro which can give copy name of worksheet to cell in eg. A1. Is it possible? Of course function is the best option. Thanks in advance. Rgs, dymek |
copy name from active sheet to cell - using macro or function
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1) )-FIND("]",CELL("filename",A1)))
OR: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,LEN(CELL("filename",A 1))-FIND("]",CELL("filename",A1))) OR: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99) OR: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) NOTE: The above 3 formulas do not work if the sheet name is the same as the file name without the .xls. IOW, if the sheet name is Able and the file name is Able.xls, it won't work. HTH Otto "dymek" wrote in message ... Hello, I'm newbie I'm looking for function or macro which can give copy name of worksheet to cell in eg. A1. Is it possible? Of course function is the best option. Thanks in advance. Rgs, dymek |
copy name from active sheet to cell - using macro or function
Code you need is:
Cells(1, 1).Value = ActiveSheet.Name Assign the macro to a shortcut key, object or event (depending on your preference). "dymek" wrote: Hello, I'm newbie I'm looking for function or macro which can give copy name of worksheet to cell in eg. A1. Is it possible? Of course function is the best option. Thanks in advance. Rgs, dymek |
All times are GMT +1. The time now is 04:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com