Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto calculate day of week to week of the year (not as serial) | Excel Discussion (Misc queries) | |||
update week to week in excel. | Excel Worksheet Functions | |||
update week to week in excel. | Excel Worksheet Functions | |||
I need a payroll sheet that can auto update figures each week | Excel Worksheet Functions | |||
How do I set up a week by week skill training schedule in excel? | Excel Discussion (Misc queries) |