ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rename worksheet tabs (https://www.excelbanter.com/excel-programming/405846-rename-worksheet-tabs.html)

Patrick C. Simonds

Rename worksheet tabs
 
I have a 12 worksheets labeled Jan, Fed, Mar ect.. What I need is something
which will rename the tabs to include the correct year and that value will
be found in cell W1 of each sheet.


Don Guillett

Rename worksheet tabs
 
What do you want it to look like? All the same year? A couple of examples

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Patrick C. Simonds" wrote in message
...
I have a 12 worksheets labeled Jan, Fed, Mar ect.. What I need is something
which will rename the tabs to include the correct year and that value will
be found in cell W1 of each sheet.



Patrick C. Simonds

Rename worksheet tabs
 
Yes each tab would have the same year. I am setting this up as a template
document that will be started fresh each year.


"Don Guillett" wrote in message
...
What do you want it to look like? All the same year? A couple of examples

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Patrick C. Simonds" wrote in message
...
I have a 12 worksheets labeled Jan, Fed, Mar ect.. What I need is
something which will rename the tabs to include the correct year and that
value will be found in cell W1 of each sheet.




Dave Peterson

Rename worksheet tabs
 
Select the 12 worksheets first.

Option Explicit
Sub testme()
dim wks as worksheet
for each wks in activewindow.selectedsheets
wks.name = wks.name & " " & wks.range("W1").value
next wks
end sub

The new names will be like:
Jan 2008
(old name, space character, value in W1 of that sheet).

Remember to ungroup the sheets when you're done.

"Patrick C. Simonds" wrote:

I have a 12 worksheets labeled Jan, Fed, Mar ect.. What I need is something
which will rename the tabs to include the correct year and that value will
be found in cell W1 of each sheet.


--

Dave Peterson


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com