Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I make multiple worksheets for different days of the month. I end up copying
and then renaming. Is there a way to AUTO-FILL the consecutive dates so I don't have to rename 28-31 sheets? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Start with one sheet which you will copy.
Sub Add_Sheets_Months() Call AddMonthSheets(6, 2008) 'Adds June 2008 daily sheets End Sub Public Sub AddMonthSheets(ByRef Mnth As Integer, ByRef Yr As Integer) 'Chip Pearson code. Dim wks As Worksheet Dim dte As Date Dim lCounter As Long Set wks = Sheets("Sheet1") 'Sheet to be copied wks.Select For lCounter = 1 To 31 dte = DateSerial(Yr, Mnth, lCounter) If Month(dte) = Mnth And (Weekday(dte) < 1 And _ Weekday(dte) < 7) Then wks.Copy After:=ActiveSheet ActiveSheet.Name = Format(DateSerial(Yr, Mnth, lCounter), "Mmm dd ") End If Next lCounter End Sub Gord Dibben MS Excel MVP On Fri, 6 Jun 2008 12:58:29 -0700, Dean W. <Dean wrote: I make multiple worksheets for different days of the month. I end up copying and then renaming. Is there a way to AUTO-FILL the consecutive dates so I don't have to rename 28-31 sheets? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
auto adjusting for calculation when a row is added | Excel Discussion (Misc queries) | |||
how can figures in different worksheets can be added? | Excel Worksheet Functions | |||
All words and Symbols of keybord should be added to Auto Shapes | Excel Discussion (Misc queries) | |||
How do i set Excel to record the date etc of info added | Excel Worksheet Functions | |||
How can I get auto sum of column when new figures are added | New Users to Excel |