Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,090
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Boo Boo is offline
external usenet poster
 
Posts: 21
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Asked previously...can this not be done in excel simonsmith Excel Discussion (Misc queries) 2 May 16th 06 11:50 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
need to Copy or Move to active cell from specified range kaream Excel Discussion (Misc queries) 2 December 14th 05 08:12 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 08:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"