Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Changing all Dates on Headers

I have a workbook that I use monthly to Outline clients into different
regions. An example of one of the Headers is "August 10, 2007 - Ameritech
Business". My Problem is that the work book has 100+ tabs. Changing the
dates manually takes time that I now do not have. I searched and tried a few
trial and error codes but could not work it out. I would prefer to manually
run the code versus the dates being changed every print or every time the
workbook is opened.

I am also in need a diffrent code that would change the dates on Invidual
tabs. An example of one of the tabs is " Location Summary Dtl Aug 2007"
where the only change needed would be Aug to Sep.

I know I'm greedy!

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Changing all Dates on Headers

Running this will change all the dates in the Center header to today's date:

Sub adjustit()
For Each sh In Worksheets
sh.Activate
v = ActiveSheet.PageSetup.CenterHeader
s = Format(Date, "mmmm dd, yyyy") & " - " & Split(v, "-")(1)
ActiveSheet.PageSetup.CenterHeader = s
Next
End Sub

--
Gary''s Student - gsnu200738


"Matt Dollar" wrote:

I have a workbook that I use monthly to Outline clients into different
regions. An example of one of the Headers is "August 10, 2007 - Ameritech
Business". My Problem is that the work book has 100+ tabs. Changing the
dates manually takes time that I now do not have. I searched and tried a few
trial and error codes but could not work it out. I would prefer to manually
run the code versus the dates being changed every print or every time the
workbook is opened.

I am also in need a diffrent code that would change the dates on Invidual
tabs. An example of one of the tabs is " Location Summary Dtl Aug 2007"
where the only change needed would be Aug to Sep.

I know I'm greedy!

Thanks for your help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Changing all Dates on Headers

My bad.. forgot to mention I need to change the date monthly. Thus August
10, 2007 would need to change to September 10, 2007.


Thanks for your help though Gary"s Student

"Matt Dollar" wrote:

I have a workbook that I use monthly to Outline clients into different
regions. An example of one of the Headers is "August 10, 2007 - Ameritech
Business". My Problem is that the work book has 100+ tabs. Changing the
dates manually takes time that I now do not have. I searched and tried a few
trial and error codes but could not work it out. I would prefer to manually
run the code versus the dates being changed every print or every time the
workbook is opened.

I am also in need a diffrent code that would change the dates on Invidual
tabs. An example of one of the tabs is " Location Summary Dtl Aug 2007"
where the only change needed would be Aug to Sep.

I know I'm greedy!

Thanks for your help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Changing all Dates on Headers

So run the macro on the 10th of each month and all will be well.


OR


Sub adjustit()
For Each sh In Worksheets
sh.Activate
v = ActiveSheet.PageSetup.CenterHeader
s = Format(Date, "mmmm 10, yyyy") & " - " & Split(v, "-")(1)
ActiveSheet.PageSetup.CenterHeader = s
Next
End Sub

run the above anytime and the Headers will go to the 10th of the current
month!!
--
Gary''s Student - gsnu200738


"Matt Dollar" wrote:

My bad.. forgot to mention I need to change the date monthly. Thus August
10, 2007 would need to change to September 10, 2007.


Thanks for your help though Gary"s Student

"Matt Dollar" wrote:

I have a workbook that I use monthly to Outline clients into different
regions. An example of one of the Headers is "August 10, 2007 - Ameritech
Business". My Problem is that the work book has 100+ tabs. Changing the
dates manually takes time that I now do not have. I searched and tried a few
trial and error codes but could not work it out. I would prefer to manually
run the code versus the dates being changed every print or every time the
workbook is opened.

I am also in need a diffrent code that would change the dates on Invidual
tabs. An example of one of the tabs is " Location Summary Dtl Aug 2007"
where the only change needed would be Aug to Sep.

I know I'm greedy!

Thanks for your help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Changing all Dates on Headers

My issue is that the report is due on the last day of the previous month.
Ie. September 10th report is due August 31st. This sort of does what I need
it to do except it changes the font. I need the font to be Times New Roman
Bold Size 14.

Once Again Thanks for your Help!
Any Ideas on changing tab dates?

M$

"Gary''s Student" wrote:

So run the macro on the 10th of each month and all will be well.


OR


Sub adjustit()
For Each sh In Worksheets
sh.Activate
v = ActiveSheet.PageSetup.CenterHeader
s = Format(Date, "mmmm 10, yyyy") & " - " & Split(v, "-")(1)
ActiveSheet.PageSetup.CenterHeader = s
Next
End Sub

run the above anytime and the Headers will go to the 10th of the current
month!!
--
Gary''s Student - gsnu200738


"Matt Dollar" wrote:

My bad.. forgot to mention I need to change the date monthly. Thus August
10, 2007 would need to change to September 10, 2007.


Thanks for your help though Gary"s Student

"Matt Dollar" wrote:

I have a workbook that I use monthly to Outline clients into different
regions. An example of one of the Headers is "August 10, 2007 - Ameritech
Business". My Problem is that the work book has 100+ tabs. Changing the
dates manually takes time that I now do not have. I searched and tried a few
trial and error codes but could not work it out. I would prefer to manually
run the code versus the dates being changed every print or every time the
workbook is opened.

I am also in need a diffrent code that would change the dates on Invidual
tabs. An example of one of the tabs is " Location Summary Dtl Aug 2007"
where the only change needed would be Aug to Sep.

I know I'm greedy!

Thanks for your help!

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
Changing headers without macros or VB Stuart Mantel Excel Discussion (Misc queries) 2 February 21st 07 03:35 PM
Changing the Column Headers back to letters from #s coach_fletcher Excel Discussion (Misc queries) 2 July 7th 06 03:20 PM
CHANGING THE COLUMN HEADERS FROM ABC.. TO 123.. ANNE V Excel Discussion (Misc queries) 4 September 16th 05 08:30 AM
Changing Dates JohnG Excel Discussion (Misc queries) 1 May 17th 05 08:15 PM
Changing Dates JohnG Excel Discussion (Misc queries) 2 May 17th 05 06:22 PM


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