Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
date from sheet name JBoulton Excel Worksheet Functions 21 April 29th 10 07:34 PM
Date as Sheet Name jlclyde Excel Discussion (Misc queries) 2 February 3rd 09 04:34 PM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
copying date from one sheet to another work sheet Jay Excel Worksheet Functions 13 September 25th 06 10:56 PM
how to use sumif function to check date in 1 sheet is < 2 sheet Bharat Saboo Excel Worksheet Functions 3 December 30th 05 07:10 AM


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