Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
shoshaw
 
Posts: n/a
Default how do I copy the worksheet tab name to a cell?

I've got a workbook with 12 tabs. Within one of the tabs, I'd like to
create a table of the 12 tab names. When I change a tab name, I want the
table to be updated automatically.
  #2   Report Post  
galimi
 
Posts: n/a
Default

I posted an example file to http://www.Galimi.com/Examples/shtChange.xls

Following is the Workbook_Activate code

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name < shtPlace.Name Then Exit Sub

For Each sht In ThisWorkbook.Sheets
shtPlace.Range("nmSht").Offset(intr) = sht.Name
intr = intr + 1

Next

End Sub

http://HelpExcel.com

"shoshaw" wrote:

I've got a workbook with 12 tabs. Within one of the tabs, I'd like to
create a table of the 12 tab names. When I change a tab name, I want the
table to be updated automatically.

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Assuming that your tabs are named Sheet1, etc, then in A1 put

=MID(CELL("Filename",Sheet1!A1),FIND("]",CELL("Filename",Sheet1!A1))+1,255)

In A2

=MID(CELL("Filename",Sheet1!A2),FIND("]",CELL("Filename",Sheet1!A2))+1,255)

etc

As you change any sheet names the table uipdates. Just change to your sheet
names. If they include spaces in the names, enclose the sheet name in single
quotes.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"galimi" wrote in message
...
I posted an example file to http://www.Galimi.com/Examples/shtChange.xls

Following is the Workbook_Activate code

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name < shtPlace.Name Then Exit Sub

For Each sht In ThisWorkbook.Sheets
shtPlace.Range("nmSht").Offset(intr) = sht.Name
intr = intr + 1

Next

End Sub

http://HelpExcel.com

"shoshaw" wrote:

I've got a workbook with 12 tabs. Within one of the tabs, I'd like to
create a table of the 12 tab names. When I change a tab name, I want

the
table to be updated automatically.



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
how do i copy formula and change worksheet instead of cell dal0506 Excel Worksheet Functions 2 January 21st 05 08:41 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM
sending data from one cell to another (not using copy & paste) Charlie Payne Excel Worksheet Functions 3 December 6th 04 03:28 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
name of another worksheet in cell for reference Tom A Johnson Excel Worksheet Functions 2 November 11th 04 11:28 PM


All times are GMT +1. The time now is 04:24 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"