Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet tab date
hello,
I am trying to make a one year lesson plan for my class. The first sheet tab's name is August 11-15. Is there a code or a formula to make the next sheet tab go August 17-21 (skips saturday and sunday) and so on until the end of the school year?. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet tab date
Sub NameTabs()
Dim dtValue as Date, dt1 as Date Dim dt2 as Date Dim i as long, sh as Worksheet dtValue = DateValue("August 11, 2003") i = 0 for each sh in ThisWorkbook.worksheets dt1 = dtValue + 7 * i dt2 = dtValue + 7 * i + 5 if month(dt1) = month(dt2) then sh.name = Format(dt1,"mmmm dd") & "-" _ & format(dt2,"dd") else sh.name = Format(dt1,"mmmm dd") & "-" _ & format(dt2,"mmmm dd") End if i = i + 1 Next End Sub -- Regards, Tom Ogilvy boogie wrote in message ... hello, I am trying to make a one year lesson plan for my class. The first sheet tab's name is August 11-15. Is there a code or a formula to make the next sheet tab go August 17-21 (skips saturday and sunday) and so on until the end of the school year?. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
date from sheet name | Excel Worksheet Functions | |||
Date as Sheet Name | Excel Discussion (Misc queries) | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
copying date from one sheet to another work sheet | Excel Worksheet Functions | |||
how to use sumif function to check date in 1 sheet is < 2 sheet | Excel Worksheet Functions |