Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Worksheet tab labels

I have a number of worksheets that I use on an annual basis, updated monthly.
It is best if I keep each worksheet and save it indefinitely because it is
finacnce related. Since I have to recreate every year it would be fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet. I
would like to know if there is a way to change the year on each tab to the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select rename and
change the year twelve times per project. I would really appreciate any input
that someone could offer to speed up this process.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 320
Default Worksheet tab labels

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated monthly.
It is best if I keep each worksheet and save it indefinitely because it is
finacnce related. Since I have to recreate every year it would be fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet. I
would like to know if there is a way to change the year on each tab to the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select rename and
change the year twelve times per project. I would really appreciate any input
that someone could offer to speed up this process.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Worksheet tab labels

How do I go about using the routine?

"Bob Umlas, Excel MVP" wrote:

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated monthly.
It is best if I keep each worksheet and save it indefinitely because it is
finacnce related. Since I have to recreate every year it would be fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet. I
would like to know if there is a way to change the year on each tab to the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select rename and
change the year twelve times per project. I would really appreciate any input
that someone could offer to speed up this process.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Worksheet tab labels


You can just add it and run it
- go into the VBIDE (Alt-F11)
- insert a module (menu InsertModule)
- paste the code into the module code pane that shows
- select anywhere within the procedure and run it, F5


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brenda463" wrote in message
...
How do I go about using the routine?

"Bob Umlas, Excel MVP" wrote:

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated
monthly.
It is best if I keep each worksheet and save it indefinitely because it
is
finacnce related. Since I have to recreate every year it would be
fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet.
I
would like to know if there is a way to change the year on each tab to
the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select
rename and
change the year twelve times per project. I would really appreciate any
input
that someone could offer to speed up this process.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Worksheet tab labels

I cannot seem to get this to run. Do I need to save this first. I did put it
in. I set the year(7) - 1, Year(8). and I did the F5 with the worksheet that
I was basing it on open. A macro module opened that reflected this (Update
Tabs) and gave me the option to run it. I clicked on Run. Nothing happened.
Any idea what I might be overlooking?

"Bob Phillips" wrote:


You can just add it and run it
- go into the VBIDE (Alt-F11)
- insert a module (menu InsertModule)
- paste the code into the module code pane that shows
- select anywhere within the procedure and run it, F5


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brenda463" wrote in message
...
How do I go about using the routine?

"Bob Umlas, Excel MVP" wrote:

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated
monthly.
It is best if I keep each worksheet and save it indefinitely because it
is
finacnce related. Since I have to recreate every year it would be
fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet.
I
would like to know if there is a way to change the year on each tab to
the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select
rename and
change the year twelve times per project. I would really appreciate any
input
that someone could offer to speed up this process.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Worksheet tab labels

Don't change the word "Date" to 7 or 8

Year(Date) means return the Year of today's date.

Since today is in 2008, the Year(Date) -1 looks for 2007 in the sheet name.

The next Year(Date) returns 2008 and changes the 2007 to 2008


Gord Dibben MS Excel MVP

On Mon, 14 Jan 2008 09:09:04 -0800, Brenda463
wrote:

I cannot seem to get this to run. Do I need to save this first. I did put it
in. I set the year(7) - 1, Year(8). and I did the F5 with the worksheet that
I was basing it on open. A macro module opened that reflected this (Update
Tabs) and gave me the option to run it. I clicked on Run. Nothing happened.
Any idea what I might be overlooking?

"Bob Phillips" wrote:


You can just add it and run it
- go into the VBIDE (Alt-F11)
- insert a module (menu InsertModule)
- paste the code into the module code pane that shows
- select anywhere within the procedure and run it, F5


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brenda463" wrote in message
...
How do I go about using the routine?

"Bob Umlas, Excel MVP" wrote:

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated
monthly.
It is best if I keep each worksheet and save it indefinitely because it
is
finacnce related. Since I have to recreate every year it would be
fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet.
I
would like to know if there is a way to change the year on each tab to
the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select
rename and
change the year twelve times per project. I would really appreciate any
input
that someone could offer to speed up this process.





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Worksheet tab labels

Thank you. I had run it that way originally. My problem was that the year was
in 2 digits only and it could not find it. I corrected that and it works. Do
I need to save this in order to reuse it again in future years? If so, please
tell me what is the best way to do that.

"Gord Dibben" wrote:

Don't change the word "Date" to 7 or 8

Year(Date) means return the Year of today's date.

Since today is in 2008, the Year(Date) -1 looks for 2007 in the sheet name.

The next Year(Date) returns 2008 and changes the 2007 to 2008


Gord Dibben MS Excel MVP

On Mon, 14 Jan 2008 09:09:04 -0800, Brenda463
wrote:

I cannot seem to get this to run. Do I need to save this first. I did put it
in. I set the year(7) - 1, Year(8). and I did the F5 with the worksheet that
I was basing it on open. A macro module opened that reflected this (Update
Tabs) and gave me the option to run it. I clicked on Run. Nothing happened.
Any idea what I might be overlooking?

"Bob Phillips" wrote:


You can just add it and run it
- go into the VBIDE (Alt-F11)
- insert a module (menu InsertModule)
- paste the code into the module code pane that shows
- select anywhere within the procedure and run it, F5


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brenda463" wrote in message
...
How do I go about using the routine?

"Bob Umlas, Excel MVP" wrote:

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated
monthly.
It is best if I keep each worksheet and save it indefinitely because it
is
finacnce related. Since I have to recreate every year it would be
fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet.
I
would like to know if there is a way to change the year on each tab to
the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select
rename and
change the year twelve times per project. I would really appreciate any
input
that someone could offer to speed up this process.





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Worksheet tab labels

There is no "best" way.

If you have a Personal.xls you would copy the macro and stick it in a module in
that file.

You would have to make changes to the code to point to the activeworkbook

Sub UpdateTabs()
On Error Resume Next
For Each tbb In ActiveWorkbook.Sheets
tbb.Name = Application.Substitute(tbb.Name, _
Year(Date) - 1, Year(Date))
Next
End Sub

Or you could just leave it in the workbook in which it now resides.


Gord


On Mon, 14 Jan 2008 12:45:02 -0800, Brenda463
wrote:

Thank you. I had run it that way originally. My problem was that the year was
in 2 digits only and it could not find it. I corrected that and it works. Do
I need to save this in order to reuse it again in future years? If so, please
tell me what is the best way to do that.

"Gord Dibben" wrote:

Don't change the word "Date" to 7 or 8

Year(Date) means return the Year of today's date.

Since today is in 2008, the Year(Date) -1 looks for 2007 in the sheet name.

The next Year(Date) returns 2008 and changes the 2007 to 2008


Gord Dibben MS Excel MVP

On Mon, 14 Jan 2008 09:09:04 -0800, Brenda463
wrote:

I cannot seem to get this to run. Do I need to save this first. I did put it
in. I set the year(7) - 1, Year(8). and I did the F5 with the worksheet that
I was basing it on open. A macro module opened that reflected this (Update
Tabs) and gave me the option to run it. I clicked on Run. Nothing happened.
Any idea what I might be overlooking?

"Bob Phillips" wrote:


You can just add it and run it
- go into the VBIDE (Alt-F11)
- insert a module (menu InsertModule)
- paste the code into the module code pane that shows
- select anywhere within the procedure and run it, F5


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brenda463" wrote in message
...
How do I go about using the routine?

"Bob Umlas, Excel MVP" wrote:

A short routine would do it...
Sub UpdateTabs()
On Error Resume Next
For Each tbb In Sheets
tbb.Name = Application.Substitute(tbb.Name, Year(Date) - 1,
Year(Date))
Next
End Sub

"Brenda463" wrote:

I have a number of worksheets that I use on an annual basis, updated
monthly.
It is best if I keep each worksheet and save it indefinitely because it
is
finacnce related. Since I have to recreate every year it would be
fastest if
I could use the completed one and update the tab labels to reflect the
current year. I use the month and the year on the tab of the worksheet.
I
would like to know if there is a way to change the year on each tab to
the
new year and then do a save as and rename it to the current year.
I think that it would be much faster if I did not have to go to each
individual sheet and click on the page then right click and select
rename and
change the year twelve times per project. I would really appreciate any
input
that someone could offer to speed up this process.






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 make the font on worksheet tab labels larger? lmlorenze Excel Discussion (Misc queries) 1 June 21st 07 05:40 PM
how do i get x axis labels to display the same as they do in a worksheet? [email protected] Charts and Charting in Excel 1 March 1st 07 01:02 PM
PRINTING LABELS FROM EXCELL WORKSHEET NORFUS New Users to Excel 3 May 12th 06 03:17 AM
Worksheet Column Labels ... Alphabet or Numeric ? monir Excel Discussion (Misc queries) 1 April 6th 06 08:48 PM
how do I reference tab labels from a worksheet in a cell in the wb keri Excel Worksheet Functions 1 March 16th 06 03:02 AM


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

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

About Us

"It's about Microsoft Excel"