PC Review


Reply
Thread Tools Rate Thread

days of the current month

 
 
David Gladstone
Guest
Posts: n/a
 
      2nd Nov 2011
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.
Thanks in advance
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      2nd Nov 2011
On Nov 2, 2:48*pm, David Gladstone <gladstone...@gmail.com> wrote:
> 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.
> Thanks in advance

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
 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      2nd Nov 2011

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 .
http://www.contextures.com/excel-sort-addin.html .
(editorial review of Special Sort excel add-in (30 ways to sort)




"David Gladstone"
<(E-Mail Removed)>
wrote in message
news:ca42d386-6888-4530-8a7d-(E-Mail Removed)...
> 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.
> Thanks in advance



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:56 AM.