![]() |
Naming & renaming a sheet tab
Hi
I have a workbook that contains 12 sheets. The 1st sheet is a Help sheet, The 2nd sheet is a Team Data sheet and the 3rd through 12th sheets are 10 individual player's, player 1 through player 10. In the team data sheet when I fill in a player's name in cell F6 ( John Doe ) for instance I would like for that to appear in the Tab of player 1 sheet (I don't want to add new sheets I just want the name that's in team data sheet F6 cell to rename the tab of player 1 sheet) and so on for each player. F7 in the Tab of player 2 sheet F8 in the Tab of player 3 sheet F9 in the Tab of player 4 sheet F10 in the Tab of player 5 sheet F11 in the Tab of player 6 sheet F12 in the Tab of player 7 sheet F13 in the Tab of player 8 sheet F14 in the Tab of player 9 sheet F15 in the Tab of player 10 sheet My view code window looks like this. Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub Thanks. |
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("F6:F15")) Is Nothing Then Worksheets(Target.Row-4).Name = Target.Value End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Cgbilliar" wrote in message ... Hi I have a workbook that contains 12 sheets. The 1st sheet is a Help sheet, The 2nd sheet is a Team Data sheet and the 3rd through 12th sheets are 10 individual player's, player 1 through player 10. In the team data sheet when I fill in a player's name in cell F6 ( John Doe ) for instance I would like for that to appear in the Tab of player 1 sheet (I don't want to add new sheets I just want the name that's in team data sheet F6 cell to rename the tab of player 1 sheet) and so on for each player. F7 in the Tab of player 2 sheet F8 in the Tab of player 3 sheet F9 in the Tab of player 4 sheet F10 in the Tab of player 5 sheet F11 in the Tab of player 6 sheet F12 in the Tab of player 7 sheet F13 in the Tab of player 8 sheet F14 in the Tab of player 9 sheet F15 in the Tab of player 10 sheet My view code window looks like this. Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub Thanks. |
All times are GMT +1. The time now is 01:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com