Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Update all tabs, incrementing one week per tab

Hi,

We use Excel 2007 for our weekly time sheet. Each tab is labeled that date
of the Saturday for each week. I have a formula to include the tab name in
the worksheet for that week. Is there a macro or vb code I can use to update
all of the tabs to increment one week for the 52 weeks in a year.

For example, for our 2009 timesheet, the label for tab one (week one) will
be 01-03-2009, for tab 2 (week 2) it will be 01-10-2009, tab 3 (week 3) will
be 01-17-2009, etc.

I am assuming that if I name the first tab 01-03-2009 I should be able to
add 7 days to each tab from the rpevious week's tab, but I do not know how to
do this.

I see tips for incrementing monthly, but not weekly using the date.

Thank you for your help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Update all tabs, incrementing one week per tab

I found the answer (with a little modification) in the Excel General
Questions forum.

Full credit to Bob Phillips
Post name: Subject: I want to change the name of (52) worksheets.

Here it is:

Sub mymacro()
Dim i As Long
Dim start As Date
With ActiveWorkbook
start = DateValue(Replace(.Worksheets(1).Name, "", ""))
For i = 2 To .Worksheets.Count
Worksheets(i).Name = Format(start + (i - 1) * 7, "mm-dd-yyyy")
Next i
End With
End Sub

"Ken Peterson" wrote:

Hi,

We use Excel 2007 for our weekly time sheet. Each tab is labeled that date
of the Saturday for each week. I have a formula to include the tab name in
the worksheet for that week. Is there a macro or vb code I can use to update
all of the tabs to increment one week for the 52 weeks in a year.

For example, for our 2009 timesheet, the label for tab one (week one) will
be 01-03-2009, for tab 2 (week 2) it will be 01-10-2009, tab 3 (week 3) will
be 01-17-2009, etc.

I am assuming that if I name the first tab 01-03-2009 I should be able to
add 7 days to each tab from the rpevious week's tab, but I do not know how to
do this.

I see tips for incrementing monthly, but not weekly using the date.

Thank you 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
Auto calculate day of week to week of the year (not as serial) oftenconfused Excel Discussion (Misc queries) 4 June 23rd 08 05:14 PM
update week to week in excel. Rudy Excel Worksheet Functions 2 September 4th 06 05:35 PM
update week to week in excel. Rudy Excel Worksheet Functions 3 September 4th 06 03:20 PM
I need a payroll sheet that can auto update figures each week Sheila Excel Worksheet Functions 1 April 4th 06 07:56 PM
How do I set up a week by week skill training schedule in excel? davidwatts Excel Discussion (Misc queries) 0 June 16th 05 11:32 PM


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