# days of the current month

D

Is there a simple way to fill the days of the current month, e.g.
November 1 to 30 and February 1 to 28(or 29)?
I want to create a template to record temperature, rainfall etc for
each day of the month. Ideally this would create a new worksheet,
even better if it named that sheet November 2011 etc.

D

#### Don Guillett

Is there a simple way to fill the days of the current month, e.g.
November 1 to 30 and February 1 to 28(or 29)?
I want to create a template to record temperature, rainfall etc for
each day of the month.  Ideally this would create a new worksheet,
even better if it named that sheet November 2011 etc.
Why not just use ONE sheet with the whole year added a month at a time
with this macro. Then use DATA>Autofilter>filter by the month

Sub AddMonthOfDaysSAS()Dim lr As LongDim numdays As DoubleIf
Len(Application.Trim(Range("a2"))) < 1 Then   Range("a2") =
DateSerial(Year(Now), 1, 1)   Range("a2").AutoFill
Destination:=Range("a2:a32")Else   lr = Cells(Rows.Count,
1).End(xlUp).Row   numdays = Day(DateSerial(Year(Cells(lr, 1)),
Month(Cells(lr, 1)) + 2, 0))   Cells(lr + 1, 1) = Cells(lr, 1) + 1
Cells(lr + 1, 1).AutoFill Destination:=Cells(lr + 1,
1).Resize(numdays)End IfEnd Sub

J

#### Jim Cone

Enter a date in a cell... November 01, 2011
Format the cell, so the date appears as you want.
Grab the fill handle (lower right corner of the cell) with the mouse and fill down.
--
Jim Cone
Portland, Oregon USA .
(editorial review of Special Sort excel add-in (30 ways to sort)