Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Put Active Worksheet's Name in a Cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
coreymartin@gmail.com - 06 Jan 2006 18:42 GMT
Is there a way to put the active worksheet's name in the cell?  Not the
file name of the whole workbook, just the name of the currently
selected sheet.

Thanks for your help.
Rob - 07 Jan 2006 10:53 GMT
Hi Corey,

There are a few ways this can be done using either macros or functions,
here's one of each:

*=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,
LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))
(sourced from Chip Pearson's site, http://www.cpearson.com/excel/excelF.htm)
I recommend checking this page out as it also shows other possibilities.

*Sub InsertSheetNames()
Application.ScreenUpdating = False
Dim S As Worksheet
For Each S In ActiveWorkbook.Worksheets
S.Range("a1").Value = S.Name
Next S
Application.ScreenUpdating = True
End Sub
(sourced from ?, this can be inserted in a module & run as required to put
the respective sheet name in cell A1 of every sheet or adapted & put in the
"this workbook" section to run when the file is opened.)

Hth

Rob Brockett
NZ

> Is there a way to put the active worksheet's name in the cell?  Not the
> file name of the whole workbook, just the name of the currently
> selected sheet.
>
> Thanks for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.